Showing posts with label projects. Show all posts
Showing posts with label projects. Show all posts

Wednesday, February 27, 2019

MYWIFIHIFIBIPI (Wi-Fi and bluetooth playing bi-amped hi-fi system based around a raspberry pi and 5.1 receiver) or: Another abandoned project

I first was given my aunts old Onkyo TX-SD696 5.1 receiver. Then I found a pair of JBL ARC 1000's on the local classified ads. Then I went crazy.

See the rub was that several reviews of the loudspeakers mentioned that they really shine when bi-amped. I did a little research and learned what that means and that most people who think what that means don't actually know what that means.

Since I can't help but show off my new-found knowledge I'll share it. Bi-amp, etymologically just means 2 amps, but there are bountious ways to use 2 amps incorrectly. Bi-wiring is an orthogonal idea where you run 2 lines (4 conductors) instead of 1 (+- only).  You really need both to gain any advantage AND you need a preamp crossover. This is where the real advantage is to be gained: by allowing the amps to focus on amplifying their respective audio band (woofer or mids & tweeter) without the other band taking any headroom. Also the amp drives the horns directly without the other drivers electrically coupled in. The passive crossover is still there, but since all the content managed by each amp is in the passband of the channel its driving, it shouldn't have much any effect on phase or amplitude of the signal reaching the speaker. I'm not an audio expert but that jives well with the signal processing & circuit theory I learned in school. Interestingly they say these crossovers are always active, though I don't see any reason why they HAVE to be (as long as your input source has enough oomph).

Since its probably a stereo system (though I did recently acquire the traditional mono version of Pet Sounds) you actually need 2 crossovers, 4 amps, and 8 wires (4 +- pairs)! Not to mention you need speakers with 4 posts on the back and not just 2.

Well, with these new (to me) speakers, the 5.1 receiver, and some salvaged speaker wire I have most of those things. I don't actually have 4 amps, but I have 5 amp channels, which I can utilize.

What about the crossovers?!

Setting up a Raspberry Pi 3 as a Bluetooth Speaker with NO Pulseaudio...

I really don't have much against pulseaudio. I use it daily on my daily computing machine. But believe it or not, I don't do my daily computing on a bluetooth speaker. No, I'm of the persuasion that pulse is a great desktop audio system (though I have high hopes for pipewire), except for when it isn't. For pro-audio (making my own music) I use JACK and it's awesome, and you already know I use pulse for daily web browsing, music listening etc, but neither of these cases are very much like a bluetooth speaker, are they?... We need an audio system that's basically going to serve as part of an appliance. But what else is there?!

OSS?!?!!

No, there is not oss.
I mean, there is, but it was replaced for good reason.

ALSA. I'm trying to lead you to alsa. Alsa is actually the audio driver behind both JACK and pulseaudio so its lower level, but you've got a headless system for crying out loud that just connects bluetooth and streams the audio, what do you need high level stuff for?




Monday, November 13, 2017

Installing the Ninja and Meson Build Systems on OSX

I never use OSX. Doing so today has felt like trying to play guitar left handed, or say the alphabet backwards. I know what needs to be done but its unnatural and frustrating.

But I had to for work to test my meson build descriptions. I won't introduce them here, but meson seems pretty awesome and it depends on ninja for what usually make is used for.

If you are here you probably know that already anyway.

Thursday, June 23, 2016

Room Treatment and Open Source Room Evaluation

Its hard to improve something you can't measure.

My studio space is much much too reverberant. This is not surprising since its a basement room with laminate flooring and virtually no soft, absorbant surfaces at all. I planned to add acoustic treatment from the get go, but funding made me wait until now. I've been recording doing DI guitars, drum samples, and synth programming, but nothing acoustic yet until the room gets tamed a little bit.

Wednesday, June 10, 2015

Using LV2 atom:Path (or how to get files safely in a plugin without a GUI)

The end of last month marked 2 years since my initial commit to my first lv2 plugins. I've learned some things, but still am picking up more little by little. I was recently reminded that I don't know it all, when falkTX pointed out another stupid mistake I'd been making that prevented my GUIs from resizing correctly.

Water under the bridge though. I'm going to try to explain out how to use lv2 to have the host make a file selection dialog for you. I want all my plugins to work purely with host generated GUIs and loading files became necessary for porting the rakarrack *tron effects. The LV2 official documentation has improved a lot, but I was still struggling, so I thought I'd post this. The example to be used is rakarrack's reverbtron. Its a sort of convolution using very simplified impulse response files (which are actually text files). Instead of a constant sample rate in the IR, you just keep the most important samples and interpolate between them.

Regardless of the details, I have a module that needs files. All I need is to pass the file's path to the modules setfile() function and it takes care of the rest. How do I get that path? The whole process involves several extensions, and the most confusing part to me was figuring out what was what. But I got it, so read on...


Thursday, June 4, 2015

How to Boycott SourceForge

I was finally convinced to leave Sourceforge.net. I was holding out, trying to be true to a service that once was the best and most dedicated to free license and open source software, but finally, due largely to this editorial, have decided to join the boycott. Since I don't like doing things half-way I'm taking everything down and trying to make it as easy as possible for others to do the same.

If you are using git already, it won't take much to move your repositories to Github. Bitbucket will pretty much be the same commands. I already had an account so I won't describe how to sign up, but its pretty easy. Once signed in you can create a repository by clicking the little plus sign in the top right corner. Name the repo whatever your project name is and opt to leave it empty (I presume you already have the project hosted at sf.net). You should make sure you're up to date on every branch from sf.net first. Once that is done you can just go to your local repo and issue the command:

git push https://github.com/[USERNAME]/[PROJECTNAME].git master

and repeat for every branch besides master.

You can then delete the local repo and re-clone it using the URL github give you, or just edit .git/config to update what URL origin points to, or there's some git command to do it that I can't remember. You can also go delete your project from sf.net BUT I decided to leave the skeleton of the project with links to the new home at github.

To do so make sure you haven't pointed your repo's origin to github yet. If you have substitute the sf.net project git URL for origin. Go delete every branch but master on sf.net by entering:

 git push origin :branch

Then on master branch do (carefully):

rm -rf *
echo moved to [github project URL] to boycott sourceforge >> README
git commit -a -m "boycott sourceforge"
git push origin master


Careful, because rm -rf * deletes everything in the current directory. This makes it so your repository is now empty except a nice little statement of what we think of the new sf.net.

I only had source tarballs in the files section so I deleted them all and added the same readme as is in the repo. If you use this feature of sf.net it will be harder to find a substitute. This blogger subjectively goes through 14 alternatives and decides to stick with sourceforge. Hopefully you can find one of the alternatives workable.  I also edited the project description to say that the project had moved.

 If your project has a website you can move it to github quite easily too. Just go to your repo that is now using github for the origin and type:

git checkout -b gh-pages
rm -rf *


The name of the branch (gh-pages) is very important. Download the site source from the sourceforge ftp if you need or if you have a local copy just copy it all into the repo. Make sure you have an index.html and then just:

git add *
git commit -a -m "adding site"
git push origin gh-pages

Your new site is at http://[USERNAME].github.io.com/[PROJECTNAME]
Not too bad!

I wish I had a good answer about binaries. If you use other features like mailing lists you might have to do some more homework too. If you have found good solutions, spread the word, leave a comment.

Now, as a commentary, SourceForge hasn't done anything illegal. The GPL of most open software allows them completely to package it with adware, malware or whatever. But is that cool? Heck no! So on grounds of ethics, it has come time to boycott. Do not visit sf.net, do not download from there, and do not give them your code to host. I avoided Github for a long time because I felt they weren't as dedicated to open source, since their site code is not open (and partially because I tend to kick back when something seems trendy). But honestly it seems they've found a business model that is working for them and allows us more freedom for free software projects. SourceForge is not what it once was, and we owe the current management of it no loyalty. I don't really mind which service you move to, but don't stay.

Tuesday, May 12, 2015

Infamous Plugins are Tiling!

I'm very very excited to say this:

1000 words


Thanks to falktx helping me understand what he told me months ago, the infamous plugins are all now 100% resizable. Which means I can use them comfortably in my beloved i3.

These just may be the first rumblings of an early release... stay tuned.

Thursday, December 18, 2014

JACK Midi Control from your Android Phone over WiFi

Since my fundraising for my plugin GUIs is more or less bust, I've been thinking more about making music. I can't really stop developing, cause I'm fairly addicted, but I'm trying to ween myself back to just making whatever I want, rather than trying to develop stuff that will change the world. The world doesn't care that much. Anyhow, this blog is no place for bitterness.

But I have been playing with synths a bit more lately and still am really missing my expression controls. Now I could try to use the old touchmidi app I developed, but it only works with my laptop, and I now have a dedicated desktop in the studio to host my synths so I don't have a touchpad to use. I do have several android devices though. They should be great input interfaces. They can display whatever they like on the screen and have a touch interface so you can have arbitrary configurations of buttons, sliders, knobs, whatever. So I decided to figure out how.

Tuesday, November 11, 2014

FIX IS VERY SWEET!

One of my mission companions would say that a lot. He threatened (jokingly) to fix people. He was Tongan and barely spoke English or Filipino but we had fun and got some good work done.

Regardless of that, my Presonus Firebox had been making a strange whining sound for a while. I started a session a few weeks ago to finally begin a new song but (as usual) didn't get very far before fatherly duty called and the session sat for at least 2 weeks or so. This happens as regularly as I record which is roughly every few weeks. I eventually passed through the studio to grab something out of our food storage in the next room and realized that the firebox was completely dark. "Strange," I thought so I went and tried to restart JACK. The firebox wheezed and whined and eventually the blue LED slowly lit up. "Not good," I thought (I usually think very tersely), but I had to get that food upstairs and get dinner on for the kids.

Friday, October 24, 2014

My First Linux Audio Tutorial Video

I like that title. It makes me think of chunky toys and blocky characters with big eyes. But this is much less cute than my kids playthings: I made a video to introduce my infamous plugins. Here is the video. How I did it is below.
(if you can't see the embeded player here's the link: http://youtu.be/oHCPgh9HRAQ )
EDIT: The second one is done now too. See  http://youtu.be/izyf27eLPPA

Wednesday, September 10, 2014

Adding Blur in Cairo

I've made several widgets now that light up. I've worked around it mostly through gradients. Radial gradients are perfect for a circular LED. A linear gradient filling a carefully shaped path got me by for a square LED. But now I'm making an analog oscilloscope type widget, and a 7 segment LED and gradients aren't cutting it. If only you could do blur in Cairo.

Oh, but you can...

Tuesday, August 19, 2014

Making an LV2 plugin GUI (yes, in Inkscape)

Told you I'd be back.

So I made this pretty UI last post but I never really told you how to actually use it (I'm assuming you've read the previous 2 posts, this is the 3rd in the series). Since I'm "only a plugin developer," that's what I'm going to apply it to. Now I've been making audio plugins for longer than I can hold my breath, but I've never bothered to make one with a GUI. GUI coding seems so boring compared to DSP and it's so subjective (user: "that GUI is so unintuitive/natural/cluttered/inefficient/pretty/ugly/slow etc. etc....") and I actually like the idea of using your ears rather than a silly visual curve, but I can't deny, a pretty GUI does increase usership. Look at the Calf plugins...

Anyhow, regardless of whether its right or wrong I'm going to make GUIs (that are completely optional, you can always use the host generated UI). I think with the infamous cellular automaton synth I will actually be able to make it easier to use, so the GUI is justifiable, but other than that they're all eye candy, so why not make 'em sweet? So I'll draw them first, then worry about making them an actual UI. I've been trying to do this drawing-first strategy for years but once I started toying with svg2cairo I thought I might actually be able to do it this time. Actually as I'm writing this paragraph the ball is still up in the air, so it might not pan out, but I'm pretty confident by the time you read the last paragraph in this almost-tutorial I'll have a plugin with a GUI.

(*EDIT 14 Sept 2015 - a big mistake was pointed out to me in my LV2_UI instantiation, updated below).

So lets rip into it:

Monday, August 11, 2014

Drawing a GUI in Inkscape

So I got all excited and posted that last article about a lot of the technical stuff to make a GUI in Inkscape, but after posting it I realized it makes quite a few assumptions, so I'm going to add a few follow on posts, some of which (mostly this one) should have been written first. So its a prequel. Or a Part 0. Something like that.

Anyway the biggest assumption I made is that you are proficient in inkscape. Perhaps you are, but I wasn't until I started trying to draw GUIs in it. So basically all my skills are honed to this purpose. I'm not qualified to give a real inkscape tutorial so you should probably stop reading right now, but just in case I can help someone out there make a cool GUI I'll press onward.


Wednesday, July 30, 2014

Creating A GUI in Inkscape

Long time no post eh? Busy busy times. The roof of my house is naked and I'm trying to get it covered up, so not much free time. But I was trying this while waiting for a build at work. I still owe you dedicated reader(s) a discussion on some of the production techniques on my new song, but it will be a while.

Anyhow, I fiddled for a year or more with creating QT widgets that display svg drawings of primitives I draw in inkscape. I was trying to do this for rakarrack and at the time it was the best way I could reconcile my infantile GUI knowledge with my infantile art skills (inkscape is manageable for me. You just draw shapes. Its geometry!). I had moderate success, the widgets are functional, (and can be found in my infamous repository) but lacking some significant features, namely, due to QT, no floating point representation in dials. Also I have to manually create a file to dictate what primitive files are used and where they are placed in the window. The svg files are loaded at run time after this descriptor file is parsed allowing for anyone to customize the look, which is kinda cool, but not really necessary. In the end, it was over complicated, and I didn't really like working on it (why I haven't released a single program with a fancy stylized gui yet).

Enter AVTK.

Wednesday, July 23, 2014

How to Export a Github Wiki to PDFs and/or a Website

I recently needed to forward some documentation for work. This documentation had been done wisely in a wiki in Github. Unfortunately it was an enterprise account and we couldn't just give them a link. I just needed to put the important sections into a pdf or website and send it along.

Unfortunately I couldn't figure out how to do it.

After some pain and suffering I got it the way I wanted, and I'm sharing it here so I don't forget.

Saturday, July 13, 2013

The Infamous Cellular Automaton Synth

It started with the obfuscated C competition... and a youtube video. Well, no it really started with learning about Conway's Game of Life. Err.. It started with a video about a 13 year old girl who was implementing Conway's Game of Life on the raspberry pi... Ahem. I became interested in cellular automata and especially linking it to music. I originally tried to emulate this one liner that was getting passed around on IRC:
echo "main(i){for(i=0;;i++)putchar(((i*(i>>8|i>>9)&46&i>>8))^(i&i>>13|i>>6));}" | gcc -x c - && ./a.out | aplay
I tried to implement my own version that used an automaton to do the same sort of thing (I'll let you scratch your head on what it does, or just copy and paste it into your terminal). It took me a while to get it working, but I eventually got an automaton operating successfully on a torus. I then went and obfuscated it thinking of entering it into the IOCC. It looks pretty good:
echo "main(_i_,i,_,i_i){i_i=30;for(i=7;;i=_i_<<1|_i_>>7) {_i_=0;for(_=0;_<8;_++)_i_|=((i_i&1<<((i>>_|i<<(1+~_&7))&7))>0) <<_;putchar(_i_);}}" | gcc -x c - && ./a.out | aplay
 
Got it? Simple enough. So where did I go with this?


Monday, June 17, 2013

First Impressions with LV2 Plugin Development (almost a tutorial)

Well, its been a while hasn't it? I'm actually done with my thesis. Done. Completo. Tapos na. Weird. Luckily I still have some publications from it to submit, otherwise I wouldn't have a single thing to put off. Except...we bought a  house, and it needs a new roof, and I should be working on that...

But I'm not. In fact, I've been pretty busy with trying to spend my time on unimportant things like synthesizers. I finally started writing one. It actually started when I found out someone was making LV2 midi filters that I'd been wanting to do for quite some time (to add "humanization" in Ardour 3 etc.) I contributed a  variant that used a normal distribution rather than a uniform one (using a modified Marsaglia polar method no less). Once I'd done that lv2 plugin it just broke down the wall and I felt like I could easily do a synth.


Wednesday, March 27, 2013

rbdrum2midi

Its fun to hit stuff. Which is why drumming is so therapeutic. However dums may seems cost prohibitive to many of us. I too have felt that. However there is hope! For a few bucks at a local garage sale you can probably find folks getting rid of their old drum rockband drum sets for various gaming systems. This gives you something to hit, but it doesn't sound much like a drum. But could it?

Would I really be setting you up like this if it couldn't?


Thursday, January 31, 2013

Its Convoluted

I'm so ridiculously close to having my thesis done its ridiculous. I'm crazy not to just finish it up. So why am I writing this? I'm not sure.



I stayed up really late last night trying to finish episode 61 of OSMP. I got pretty frustrated with Ardour3 but I think it may have been a result of creating the project in 48khz sampling the recording and mixing everything at 44.1khz. Anyway its out now so go have a listen. I talk a little about IRC a lot about convolution and impulse responses (IRs), and a little about the next Tunestorm. I'm not going to stenograph everything I said in those wee hours of the morning, you can go listen to it, but I'd like to add a few things here.