Prompt Details
Model
Chat - GPT-3.5 (gpt-3.5-turbo)
Token size
200 ($0.00040 / call)
Example input
2-minute jazzy music with multiple phases
Example output
Sure, here's an example code that generates an original Jazzy melody lasting 2 minutes:
ruby
use_bpm 120
# Define synths and samples
sax = :sax
piano = :piano
bass = :pluck
drums = :drum_cymbal_pedal
# Define functions to generate random variations
define :random_rhythm do
return [0.25, 0.5, 0.75].choose
end
define :random_note do
return scale(:C4, :blues_minor_pentatonic).choose
end
# Define musical phrases
define :phrase1 do
with_fx :reverb, room: 0.8 do
use_synth sax
play_pattern_timed [60, 63, 65, 67], [0.25, 0.25, 0.5, 1], amp: 0.5
end
end
define :phrase2 do
with_fx :slicer, phase: [0.25, 0.5].choose, invert_wave: 1 do
use_synth piano
play_pattern_timed [72, 74, 76], [0.5, random_rhythm], amp: 0.7
end
end
define :phrase3 do
with_fx :echo, mix: 0.5, phase: 0.25 do
use_synth bass
play_pattern_timed [:C3, :D3, :E3], [0.5, 0.25, 1], amp: 0.8
end
end
define :phrase4 do
with_fx :tremolo, depth: 0.5, phase: 0.25 do
use_synth sax
play_pattern_timed [:G4, :A4, :Bb4], [1, random_rhythm], amp: 0.6
end
end
# Define dynamic changes
in_thread do
2.times do
control sax, amp: rrand(0.3, 0.7)
control bass, amp: rrand(0.4, 0.9)
sleep 8
end
control sax, amp: 1.0
control bass, amp: 1.0
end
in_thread do
2.times do
control :bpm, rate: rrand(0.9, 1.1)
sleep 8
end
control :bpm, rate: 1.0
end
in_thread do
2.times do
control sax, pitch: rrand(-0.2, 0.2)
sleep 8
end
control sax, pitch: 0
end
# Play musical phrases
live_loop :jazzy_melody do
4.times do
phrase1
phrase2
end
2.times do
phrase3
phrase4
end
end
live_loop :jazzy_drums do
sample drums, amp: 0.5
sleep 1
end
The code defines four unique musical phrases: phrase1 uses a sax synth to play a jazzy melody; phrase2 uses a piano synth with a slicer effect to create a glitchy arpeggio; phrase3 uses a pluck bass synth with an echo effect to create a walking bassline; and `phrase4
By purchasing this prompt, you agree to our terms of service
GPT-3.5-TURBO
This is a prompt you absolutely must try! It will allow you to generate a piece of code that you can import on Sonic Pi to generate music, all simply thanks to ChatGPT!
...more
Added over 1 month ago

