This is Madonna's Material Girl in javascript. Enjoy.
The melody is left for you. Lyrics at the bottom. 👇
You can listen to the song and play with the code here on Strudel.cc
//////////////////////////////////////////////////////////////////////////////////////////
//
// Material Girl — Madonna
// @license CC BY-NC-SA 4.0 https://creativecommons.org/licenses/by-nc-sa/4.0/
// @by Bitcoin Graffiti
// @date Aug 23-24, 2025
//
//////////////////////////////////////////////////////////////////////////////////////////
setcpm(34)
//percussion
const prelude = s("~ ~ [~ bd] sd").gain(.5).room(.5)
const sd = s("sd").beat("1, 3", 4).gain(.4).color("orange").room(.5)
const bd = s("bd").beat("2, 4", 4).gain(.3).color("yellow").room(.5)
const hh = s("hh!8").gain("[.2 .4 .2 .5]").color("gold").room(.5)
const oh = s("<~ ~ ~ [~ ~ oh oh]>").gain("<0 .3>").color("gold").room(.5)
const br = s("< ~!3 [~ ~ [sd!3 ~] [sd!3 ~]]>").gain(.3).color("silver").room(.5)
const br2 = s("< ~!3 [[sd!3 ~] sd [sd!3 ~]!2 ]>").gain(.3).color("silver").room(.5)
const cbr = s("< ~!7 [~ ~ [sd!3 ~] [sd!3 ~]]>").gain(.3).color("silver").room(.5)
const cr = s("<cr ~!7 >").gain(.4).color("silver").room(.5).sustain(4)
const drums = stack( bd, sd, hh, oh)
//bass
const bass = note("c2@2 c2@2 [g1 c2]@2 ~ g1").s("gm_electric_bass_finger:2").gain(.6).color('red').lpf(1000).legato(.5).vib(128).room(.2).color("red")
const bass_verse = note("<c2 c2 bb1 a1>@2 <c2 c2 bb1 a1>@2 [<g1 g1 f1 e1> <c2 c2 bb1 a1>]@2 ~ <g1 g1 f1 e1>").s("gm_electric_bass_finger:2").gain(.6).lpf(1000).legato(.5).vib(128).room(.2).color("red")
const bass_verse_2 = note("<c2 c2 d2 c2>@2 <c2 c2 d2 c2>@2 [g1 <c2 c2 g2 c2>]@2 ~ g1").s("gm_electric_bass_finger:2").gain(.6).lpf(1000).legato(.5).vib(128).room(.2).color("red")
const bass_chorus = note("f2@2 [c3 f2]@2 [g2 d3]@2 ~ g2 [g2 d3]@2 [g2 e2]@2 [a2 e3]@2 [g2d3]@2 f2@2 [c3 f2]@2 [g2 d3]@2 ~ g2 [a2 e3]@2[a2 e2]@2[g2 d2]@2[g2 e2]@2").s("gm_electric_bass_finger:2").slow(4).gain(.6).lpf(1000).legato(.5).vib(128).room(.2).color("red")
//guitar
const guitar = note("[~!2 <[g, bb, c4, f4 ] [g, c4, e4]>!2]!2").s("gm_electric_guitar_muted:10").legato(.4).gain(.3).room(.9)
const guitar_verse = note("[~!2 <[g, c4, f4 ] [g, c4, e4] [bb, d4, f4 ] [a, c4, e4]>!2]!2").s("gm_electric_guitar_muted:10").legato(.4).gain(.3).room(.9).color("teal")
const guitar_verse_2 = note("[~!2 <[g, c4, f4] [g, c4, e4] [g, c4, d4, f4] [g, c4, e4]>!2]!2").s("gm_electric_guitar_muted:10").legato(.4).gain(.3).room(.9).color("teal")
const flute = note("[g, bb] ~ ~ [~ [e, g]] ~ ~ [g, c4]").s("gm_flute:1").slow(2).attack(.2).gain(.3).lpf(1200).vib(1).hpf(800).room(.8).legato(1).color("blue")
const melody = note("c@6 d@2 ~@2 d@2 d@2 d@5 e d@2 e@4 ~@2 c@2 c@4 c@2 c@2 c@2 d@3 e d@2 <e c>@4 ~@2 <g ~>@2 <g ~>@4 <g ~>@2 <e ~>@2 <d ~>@2").s("piano").gain(0.6).slow(4).s("gm_fx_atmosphere").room(.3)
const ambient = note("<[c1, e1, g1] ~!3>").s("gm_fx_atmosphere:6").release(8).room(.5)
const counter_melody = note("f2 a2 c ~ g2 b2 d ~!2 d b2 g2 e c a2 g2 f2 a2 c ~ g2 b2 d c ~ g2 b2 d <e c> ~!3").s("gm_fx_atmosphere:1").slow(4).gain(.6).room(.5).color("blue")
const synth = note("<~!3 [ ~ ~ ~ [ [b4, d4, g4, d5, g5]!2 ]] ~!4>").s("gm_synth_bass_2:5").color("blue").legato(.3).room(.3).gain(.2).vib(4)
const mel2 = note("c@3 f!2@3 f e d <c a>@2 <c g>@2 ~@2").s("gm_distortion_guitar:1").slow(2).gain(.15).room(.8).legato(.9).vib(.9)
const mel2_end = note("c4@3 f4!2@3 f4 e4 d4 c4@2 c4@2 ~@2 c4@3 f4@2 f4 e4 d4 c4@4 ~@4").s("gm_distortion_guitar:1").slow(4).gain(.15).room(.8).legato(.9).vib(.9)
const mel2_inter = note("c@3 f!2@3 f e d c@2 bb2@4 c@3 f!2@3 [f e d] c@6 ~@2").s("gm_distortion_guitar:1").slow(4).gain(.15).room(.8).legato(.9).vib(.9)
arrange(
[1, prelude],
// intro
[4, stack( bass, drums, guitar)],
[4, stack( bass, drums, guitar, flute)],
[4, stack( cr, mel2, bass, drums, guitar, flute)],
[4, stack( mel2_end, bass, drums, guitar, flute)],
//verse 1
[4, stack( bass_verse, drums, guitar_verse)],
[4, stack( bass_verse_2, drums, guitar_verse_2)],
[4, stack( bass_verse, drums, guitar_verse)],
[4, stack( bass_verse_2, drums, guitar_verse_2, br)],
// // chorus
[8, stack( cr, bass_chorus, synth, counter_melody, drums, cbr)],
// pre-verse
[4, stack( cr, bass, drums, guitar, mel2_inter)],
// verse 2
[4, stack( bass_verse, drums, guitar_verse)],
[4, stack( cr, bass_verse_2, drums, guitar_verse_2)],
[4, stack( bass_verse, drums, guitar_verse)],
[4, stack( cr, bass_verse_2, drums, guitar_verse_2, br2)],
// chorus
[8, stack( cr, bass_chorus, synth, counter_melody, drums, cbr)],
//inter-chorus
[1, stack( bass, drums, guitar, mel2)],
// chorus
[8, stack( cr, bass_chorus, synth, counter_melody, drums, cbr)],
//pre-bridge
[4, stack( cr, mel2, bass, drums, guitar, flute)],
[4, stack( mel2_end, bass, drums, guitar, flute)],
// bridge (living in a material word, MATERIAL!)
[4, stack( bass_verse, drums, guitar, flute)],
[4, stack( bass_verse_2, drums, guitar, flute, br)],
// verse 3
[4, stack( bass_verse, drums, guitar_verse)],
[4, stack( bass_verse_2, drums, guitar_verse_2, br2)],
// chorus
[8, stack( cr, bass_chorus, synth, counter_melody, drums, cbr)],
// inter-chorus
[1, stack( bass, drums, guitar, mel2)],
// chorus
[8, stack( cr, bass_chorus, synth, counter_melody, drums, cbr)],
//pre-outro
[4, stack( cr, mel2, bass, drums, guitar, flute)],
[4, stack( ambient)],
//outro
[4, stack( bass_verse, drums, guitar, flute)],
[4, stack( bass_verse_2, drums, guitar, flute, br)],
[4, stack( bass_verse, drums, guitar, flute)],
[4, stack( bass_verse_2, drums, guitar, flute, br)],
)
.pianoroll({labels:1, vertical:0})
Lyrics
Some boys kiss me, some boys hug me
I think they're okay
If they don't give me proper credit
I just walk away
They can beg and they can plead
But they can't see the light (that's right)
'Cause the boy with the cold hard cash
Is always Mister Right
'Cause we are living in a material world
And I am a material girl
You know that we are living in a material world
And I am a material girl
Some boys romance, some boys slow dance
That's all right with me
If they can't raise my interest
Then I have to let them be
Some boys try, and some boys lie
But I don't let them play (no way)
Only boys that save their pennies
Make my rainy day
'Cause we are living in a material world
And I am a material girl
You know that we are living in a material world
And I am a material girl
Living in a material world
And I am a material girl
You know that we are living in a material world
And I am a material girl
Ah-ah
Ah-ah
Ah-ah
Ah-ooh
Living in a material world (material)
Living in a material world (ah-ah)
Living in a material world (material)
Living in a material world
Boys may come, and boys may go
And that's all right, you see
Experience has made me rich
And now they're after me
'Cause everybody's living in a material world
And I am a material girl
You know that we are living in a material world
And I am a material girl (ah-ah)
Living in a material world
And I am a material girl
You know that we are living in a material world
And I am a material girl
A material, a material, a material, a material world
Living in a material world (material)
Living in a material world (ah)
Living in a material world (material)
Living in a material world (ah-ah)
Living in a material world (material)
Living in a material world
Living in a material world (material)
Living in a material world