converting IQ audio files using sox

To get information about a file:

# sox --i 10meter96.wav

Input File : '10meter96.wav'
Channels : 2
Sample Rate : 96000
Precision : 16-bit
Duration : 00:00:16.50 = 1584387 samples ~ 1237.8 CDDA sectors
File Size : 6.34M
Bit Rate : 3.07M
Sample Encoding: 16-bit Signed Integer PCM

#

To convert the sample rate:

# sox 10meter96.wav -r 44100 10meter44.wav

More useful hints about sox by Selvaganeshan at “The Geek Stuff”

http://www.thegeekstuff.com/2009/05/sound-exchange-sox-15-examples-to-manipulate-audio-files/

Here are the commands that worked to get the raw IQ data from rtl_sdr into Max

rtl_sdr -f 94900000 -s 1024000 -g 50 iq.raw

To convert the above to 96k 16bit wav format

sox -e unsigned-integer -r 1024k -t raw -b 8 -c 2 iq.raw -r 96k -b 16 iq.wav

Note: I could not get the above conversion to work with device sampling rates below 1024k. Didn’t try anything higher.

 

 

return of Pluggo

Pluggo, running in Max 4.6, on a Macbook, inside a VirtualBox instance of Windows XP.

to be continued…

Notes:

update 1/26/2014 – audio input and Max search path

For audio input to work in a windows XP virtual box inside of Mac OS, the sample rate of the microphone in Mac OS (utilities/audio midi setup) must be set to 441000. I spent hours trying to figure this out. Then found this post: https://forums.virtualbox.org/viewtopic.php?f=8&t=56628

The strangest thing is that if you activate audio input in Max without setting the above sample rate, you will get no audio output either.

Also, note that switching default sound cards in the host OS can cause the sample rates to reset back to 96 kHz – requiring them to be reset again before using VirtualBox.

The second issue was that the [vst~] object wasn’t finding names passed with the plug message. Turned out to be a simple matter of setting the path to the plugin directory in the Max file preferences.

Almost forgot – I set a shared drive to be on the E: drive – which was the original location of the plug go project directory – this eliminated need for updates in the patch.

The Pluggo authorization worked.

I was able to use the Behringer UCA202 (audio device) just by plugging it in. Although I couldn’t use any sound cards that required drivers.

http://www.amazon.com/Behringer-Latency-U-Control-UCA202-Interface/dp/B000J0IIEQ

Note: I am running plugv4r6 (the version from 2006)

 original post 

Instructions for installing Windows XP to run max 4.6 in VirtualBox on mac OS 10.8

  • Download and install VirtualBox
  • create new VirtualBox instance (1 Gb of memory)
  • install Windows XP from CD
  • install Firefox (or some reasonable browser)
  • install “guest additions CD image” from device menu select  (inside the virtual machine)
  • install Max 4.6 from c74

For Midi devices:

  • virtual machine – settings -usb – add the midi device – then unplug and replug – windows should find and install
  • also activated windows over internet –
  • installed and tested Pluggo
  • activated drag and drop (doesn’t seem to work)
  • setup shared folders 

Leap air piano in Max

Actually in this context, the word ‘piano’ is way too generous. This is a prototype from October, that uses screen mapping to separate left and right hands. It decodes gestures by looking for high velocity downward hand movements. The gestures are mapped to notes and chords based on X position. There is much de-bouncing and tweaking to get results.

Here’s a demonstration which is somewhat painful to listen to, but gets the point across.

local files:

tkzic/max teaching examples/

  • leap-scale-draw5.maxpat
  • leap-sender.maxpat

 

 

Oscilloscopes in Max

Oscilloscope from MSP tutorial 24

The X/Y mode in [scope~] help file

[jit.catch~] + [jit.graph~] help file

This C74 forum thread contains 3 patches by Graham Wakefield which use Jitter to make an X/Y scope. http://cycling74.com/forums/topic/jit-gl-graph-for-a-waveform-display/

SEV patch by Katsuhiro Chiba (http://www.audiooo.com/jp/software/index.html)
it can be used in interesting way: http://cycling74.com/forums/topic/xy-oscilloscope-with-jitter/
http://giorgiomagnanensi.com/audio-video/item/677-butterflies-2
http://giorgiomagnanensi.com/audio-video/item/640-sine-beats
http://giorgiomagnanensi.com/audio-video/item/579-noisescope

Lissajous – by Oli Larkin http://cycling74.com/forums/topic/lissajous-fun/

 

a-objects externals By Andre Sier: http://s373.net/code/a-objects/a-objects.html from: http://s373.net/code/

 

Leap Motion collision detection and state change

Collision detection and state change with Leap Motion and Max/MSP.

Second version adding musical finger-painting during the state change.

The 3rd version features a “lack of hand motion” detector which, along with collision detection, fades sounds and triggers state changes.

The non-activity detector is from a Max patch by Mattyo. The spectral filter is from a Max patch by Katja Vetter. In the filter the X,Y, and Z position of hands control number-of-bands, position, and peak width.

 

Local files:

For videos 1&2:

tkzic/max teaching examples/

  • leap-object-match2.maxpat
  • leapfinger4.maxpat
For video #3:
  • leap-dot-piano3.maxpat
  • leapfinger4.maxpat