This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
nitrogenfingers's profile picture

Moar Peripherals program: Horrible maker of horrible noises

Started by nitrogenfingers, 22 September 2014 - 09:17 PM
nitrogenfingers #1
Posted 22 September 2014 - 11:17 PM
I'm not quite sure where this fits in the forums so I've stuck it in general for the second but it might need to move to utilities later (or somewhere else now, in which case please call me up on my mistakes admins).

I was mucking around with MoarPeripherals this afternoon and was having a go playing with the iron_note block. It's pretty cool and I like the idea of being able to play some music on it but it needs more tools to be able to do that, so I threw together a little testing app with a few programs that I'll bundle together into an API a bit later, that allow playing multiple tracks at once, generating chords progressions, arpeggios, that sort of thing. It works in any key with minor and major scales, which I think is pretty neat…

I stuck it all in a little demo you can muck around with here: http://pastebin.com/WD7ppzBz . Running as is will play a bunch of demos of the above features.



But one of the fun things i kind of wanted to explore with this was procedurally generated music, which I've heard a lot of and about and wouldn't mind giving a try. I don't know a lot of musical theory which leads me to believe it may be a lost cause but my vague understanding of scales led me to the creation of the horrible maker of horrible noises!

But in all seriousness I'm going to have a harder go at this, perhaps using noise and linking the base to the melody in a meaningful way. I can perceive that having a nice effect, as well as being able to produce context-sensitive music…

Anyway just something I thought I'd share.

-NF
Edited on 22 September 2014 - 09:18 PM
Agent Silence #2
Posted 22 September 2014 - 11:55 PM
Ive been noticing alot of people doing stuff with music recently so I thought I would take a crack at it

[attachment=1879:Image.png]
Turned out pretty good, but not very easy to use by people who don't play music since im using names and not a keyboard
Lyqyd #3
Posted 23 September 2014 - 12:51 AM
Moved to Programs. I can move it over to APIs and Utilities later if you so desire. General was fine, but I think Programs fits a bit better since you've actually got some code! :P/>
theoriginalbit #4
Posted 23 September 2014 - 01:34 AM
nice :)/> I'm glad that you're looking into some cool things for my peripherals :)/>

just a quick note, the iron note block can be on networks, you could probably just use peripheral.find as opposed to using the sides loop like you've done.
nitrogenfingers #5
Posted 23 September 2014 - 01:10 PM
I didn't recognize the name of the function, then noticed it was in CC 1.6. I've fallen behind :(/>

Agent Silence your program looks really cool, I hope to make something similar for percussion stuff (though probably not to release). I put together a simple perlin noise generator this afternoon and am seeing what sort of effect it has with melody lines. I'm thinking that mountain effect it has on 2D graphs might make for an interesting top line, and if I make it simplex I could repeat motifs ad infinitum.

This track is a great example I found; from what I can tell it has two voices, a pre-scripted bass line and uses a fractal noise generator to produce a treble. It sounds very cool :D/>

But I'm still doing early research on the topic. If anyone has any ideas on procedural music generation I'd love to hear them :)/>
cdel #6
Posted 23 September 2014 - 06:05 PM
someone on reddit claimed this website had procedural music generation, I would have looked at it myself however I am impatient and the page took a while to load.