You are reading content from Scuttlebutt
@mmckegg %EmfLLZDEQOnUBkX54Urw+m7ZrXmlXcV8Kn5Wp0pJxyM=.sha256
Re: %meTZoGO9V

2017-11-21

explored adding multi-channel recording support to loop drop

It is possible to get a list of devices using navigator.mediaDevices.enumerateDevices()
you can then choose one of these devices by passing the deviceId constraint to getUserMedia.

However, you can only get the first 2 channels of a device because getUserMedia only allows stereo inputs :cry:

So looks like my only option is to do it outside of web audio. This is okay for recording, but unfortunately won’t let us to bring in channels for realtime processing.

First explored shelling out to sox for recording, but it also is pretty bad at multi-channel and multi-device stuff. Also a bit old and bloated for my purposes.

Then I discovered naudiodon a native-addon which allows you to access streams from audio hardware using port audio. It supports accessing any number of channels. Only trouble is that you can’t access channel offsets (as far as I can tell), so to capture channel 7, you also need to capture 1 - 6. Then that will probably involve unmuxing the channels out of the stream.

Also there seems to be an issue with building on macOS right now where you still have to manually brew install portaudio even though portaudio is embedded.

Need to investigate the simplest way to access individual channel streams.

But it is time for lunch!

Well the afternoon is getting on. I said I was going to play music every day this week, and I haven’t yet. Better get on to that! Too bad if I can’t quite yet record the output.


Discovered while jamming that there is definitely something weird going on with the midi clock output.

Also a bunch of sounds are sounding a bit different since messing with the envelopes. But it seems to be possible to fix just by tweaking the params a bit. There are a few issues. First one seems to be that attacks are just faster now (for the same value), and second is that releases behave differently now. Also no attack is disabling the attack rather than the old min 0.005s default.

When I added a param to a glide time, the light on my launch control didn’t reflect that there was a param added (but the knob still worked). :bug:

Experiencing a bunch of glitching whenever I interact. But it goes away when I start the profiler. Maybe memory leaks again?

Memory heap dump isn’t working, fails with some error when building the post order index. However the timeline profiler shows the memory heap only growing for each setup opened and closed, and never getting smaller. Definitely some memory leak problems again! That could be causing the garbage collector to be getting jumpy and maybe that is what is causing the glitches whenever knobs are touched? HMMMM!

At least I managed to get a wee bit of jamming in. Looks like the new looping stuff is working pretty well.

Looks like tomorrow I have some memory leaks to get to the bottom of, as well as the midi glitching to solve. Maybe the midi is caused by the performance.now() getting out of sync with audioContext.currentTime?

That and implementing some kind of track recording!!?? Tall order for a Wednesday 1 week before a gig! Gerp. :cat2:

Join Scuttlebutt now