Coding Challenge #110: Recamán's Sequence - Part 2 (Audio)

preview_player
Показать описание


Other Parts of this Challenge:

References:

Videos:

Related Coding Challenges:

Timestamps:
0:00 Welcome to the second part of the challenge!
4:00 Using the numbers of the Recamán's Sequence as the frequency of the oscillator
5:25 Thinking of the numbers of the sequence as keys of a piano!
10:52 Restricting the frequency range
14:05 Conclusion!

Editing by Mathieu Blanchette
Animations by Jason Heglund
Music from Epidemic Sound

#numbersequence #recamanssequence #music #audiovisual #visualization #p5js #javascript
Рекомендации по теме
Комментарии
Автор

you are the greatest, you stay so positive the whole time and youre an awesome programmer :D keep up the absolutely awesome work.

loukask.
Автор

Dan, you're a national treasure. I can no longer watch your videos and resist the call of sponsorship-- so now I'm a sponsor+subscriber. I'm also eagerly gobbling up Nature of Code (which I bought in physical form). Keep on trucking, don't change, and repel any urge to edit these videos. Just keep the torrent going!

JoseNario
Автор

4:45 "Human music. I like it"

joshuacleverley
Автор

This was actually really cool! This feels like something that a lot of people could try even without a lot of coding knowledge, perhaps as an exercise.

OrangeC
Автор

Just the MOST incredible channel/resource. Thank you!!!

lank_asif
Автор

MIDI: Musical Instrument Digital Interface. A way of connecting computers to electrically controlled Instruments. E.g. synthesizers, organs, etc.

It is also an audio file format.

JV-pukx
Автор

I really liked the idea of a "music of the spheres" so I mapped the frequency to a few scales in the step() function:

if (note % 12 != 2 || 5 || 7 || 10 || 12) { //C Minor. Because Emo McSobbypants says so.
// if (note % 12 != (2 || 4 || 7 || 9 || 11)) { //C Major super happy sounds
// if (note % 12 != (2 || 3 || 5 || 7 || 9 || 10 || 12)) { //C Minor Pentatonic w/ flat 5 "blues scale"
freq = floor(random(2, 3)) * (pow(2, ((note) - 49) / 12) * (1760)); //randomly spread it out between some octaves octaves
} else {
freq = pow(2, (-48 / 12)) * 1760;//if the note isn't on the scale, return the root of the scale
}


Also, here's a really crude way to swing the notes in the draw() function:

if (count % 2 == 0) { //this will swing the notes. Jazz hands! yeah!
frameRate(8); //8 notes per second-ish.
} else {
frameRate(4); //4 notes per second-ish
}

justincurtiss
Автор

Could you make a mockup of the library of babel, how it turns the page adress into the text on said page.

AB-Prince
Автор

Great fun! I think I prefer it with the full range of the piano. Nice job with the envelope. It really improves on just having the oscillator. A small note on the modulo operator. The operator's called modulo, and the number following it is called the modulus. So n % 6 would be read as n modulo six. Six is the modulus.

DaveBriccetti
Автор

I felt those first initial notes! IT was crazy on my subs...

julianbell
Автор

You could try to use a sound wave with overtones, such as triangle or sawtooth waves, if you want to hear the deepest tones.

d_vibe-swe
Автор

I'm visiting New York from Mississippi today and I'm hoping to run into you!

LTPB
Автор

Because of the (Audio) in the title, I first thought it will have no images ^^

kaosce
Автор

Take each frame of visualisation and interpret it as time x frequency table

ДмитрийВасильев-яб
Автор

Damn... Changing that sine into a square turned that into a very, very haunting melody!
Also, for some reason they decided to depricate P5.env, point us to P5.envelope but forgot to add P5.envelope to the documentation, so now we're stuck with an annoying message that pops up every time we call env.play (which in this example is 5 times per second) -_-

morphman
Автор

i ran the code myself why is it stopping at index 1126?

GermanLc
Автор

Can u make tutorial on creating partical system?

sana
Автор

I got mad when I always run my this coding challenge. Magic Sound always wander in my head now

beaverjoe
Автор

I did something like this on the day of PI

yxor
Автор

You should do a coding challenge on a cardioid. There's a video from mathologer that demonstrates it.

klevin