Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add LFO #24

Open
clowerweb opened this issue Jul 20, 2014 · 14 comments
Open

Add LFO #24

clowerweb opened this issue Jul 20, 2014 · 14 comments

Comments

@clowerweb
Copy link

Would be awesome to have an option to adjust pitch LFO length and range. With code that could do this, you could also add arpeggiation and a phaser.

@meenie
Copy link
Owner

meenie commented Jul 20, 2014

Could this be something where you create an instrument and then use it? Something like this: https://github.com/meenie/band.js/blob/master/src/instrument-packs/oscillators.js

@clowerweb
Copy link
Author

It's difficult to tell by the code (even though I'm a JS programmer), but it looks like it could be. Does it dynamically modulate the pitch based on parameters?

@meenie
Copy link
Owner

meenie commented Jul 20, 2014

Right now it's a bit basic. BandJS will call this code to create an instrument based on the params passed into OscillatorInstrumentPack. And that will return an object which has one method createNote. And every time you want it to create a note, it uses the current AudioContext and the passed in frequency to do so. So based on this section here you could create whatever type of sound you want, along with any type of effects you want to add.

In the future I would like to make it a bit more sophisticated where you could pass in more params to trigger different effects you may have setup. But for now, once you create the instrument, the only thing that changes per note is the frequency that gets passed in.

Does that make sense?

@clowerweb
Copy link
Author

Yep, makes sense. I'm currently working on a GUI for band.js, something similar to a tracker I suppose, and wanted to know how I could implement this.

The "tracker" would be a bit simpler to use than a standard tracker, based maybe more on the way Acid works, or something between a tracker and Acid. The goal is to make it simple to use. It'll also ideally generate a Huffman compressed, then base64 encoded string which decodes to JSON, so you can save and share your creations as URL strings. I already have a working Huffman compressor and decompressor that I think we can use (http://rumkin.com/tools/compression/compress_huff.php - not my script, but I'll email him and ask if we can use it).

I really like this project: http://chirp.rezoner.net/composer/ but it doesn't generate any output that could be used with band.js (and subsequently HTML5 games, unless you want to use actual audio files), and it could be more user-friendly. But I might base the GUI on something like that.

Once the project is done I'll submit a demo and pull request.

@meenie
Copy link
Owner

meenie commented Jul 20, 2014

That all sounds pretty damn cool :). If you need anything in the library to help make it easier for you (callbacks, events, etc), let me know!

I would suggest using something like Firebase.com as a backend so people could also collaborate as well.

@clowerweb
Copy link
Author

A back end would be more something that the users would implement themselves, as I don't have the resources on my server if it got popular, or the money for something like Firebase. I just plan on building the front end and sending it over to you to include in this repo or on your site if you want (and also I want to use it myself locally because it'll make it a lot easier than programming a composition). Band.js is going to be used for the music and SFX for an HTML5 game I'm working on, so this tool is going to aid me in composing all of it (I don't want to use MP3s because they can be huge and/or audibly lossy).

As for the help, I do have a couple small requests:

Can you make a sample arpeggio that sounds like this: http://chirp.rezoner.net/composer/#open=53cb20bfe5b8721d05000027,hxqngfexackgldiwnceix1zm8oos9k9 (press spacebar to play)

And a sample modulation that sounds like this: http://chirp.rezoner.net/composer/#open=53cb216de5b8721d05000028,g4txk17ox2do0f6raj9uclun7gl7syvi

Just so I can see how to implement them in Bandjs?

@meenie
Copy link
Owner

meenie commented Jul 21, 2014

@clowerweb - I'll look into getting that done. I can't use those sounds that @rezoner has done because he hasn't open sourced them. I'll see if he's willing to let Band.js use them though :).

@clowerweb
Copy link
Author

Cool, let me know what he says.

@meenie
Copy link
Owner

meenie commented Jul 31, 2014

I'm in the midst of moving to San Francisco at the moment, so I haven't had much time to work on this. I still haven't heard from @rezoner, but I'll try and follow up soon.

@rezoner
Copy link

rezoner commented Aug 1, 2014

Hello there. Sorry but I cannot afford to spend time neither on chirp or its derivatives.

I have released chirp source tho - https://github.com/rezoner/chirp - maybe you can scrap something out of it.

Putting ARP, ADSR, LFO in Band.js will require it to have a timer running and monitoring each note properties and manipulating them on them fly.

@meenie
Copy link
Owner

meenie commented Aug 1, 2014

Hey @rezoner, no worries :). Thanks for putting your stuff online! I'll have a look through.

@rezoner
Copy link

rezoner commented Aug 1, 2014

@meenie
Copy link
Owner

meenie commented Aug 1, 2014

I didn't write them though ><: https://github.com/meenie/band.js/blob/master/src/instrument-packs/noises.js - For a long time I forgot to add my source. I've recently put it in. Might want to update your source as well :).

@clowerweb
Copy link
Author

@rezoner Nice, thank you for open sourcing it, it'll definitely be very useful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants