Tag: DSP

How to install sms-tools on Mac OS X

Sound analysis/synthesis tools for music applications

http://mtg.upf.edu/technologies/sms

By Music Technology Group at Universitat Pompeu Fabra

(update: So far, the tools are painfully slow under Macports. Ubuntu performance is way faster.)

https://github.com/MTG/sms-tools

Screen Shot 2014-11-26 at 10.02.34 PM

These tools are used in:  Audio Signal Processing for Music Applications by Prof Xavier Serra, Prof Julius O Smith, III. Sms-tools was designed to run in Ubuntu Linux. After many failed attempts, it is now running in Mac OS 10.9 using macports. Although the performance is better way better using Ubuntu – on the same Macbook.

I had tried using Anaconda – but ran into problems installing pygame.

Assuming that you already know how to install macports. Then install all the python modules described at the sms-tools github page. The macports versions of the modules are prefixed by py27- , For example:

  • py27-cython
  • py27-game
  • py27-matplotlib
  • py27-ipython

also used: sudo easy_install cython

After installing all of the modules, then clone the sms-tools repository and recompile the Cython functions. You will get a screen full of warnings – but it shouldn’t matter.

 

ep-413 DSP – week 12

Web Audio API

 

A good place to start

There are many links to Web Audio project right here on this blog: http://reactivemusic.net/?tag=web-audio

Technical reference manual

Comprehensive guide from Mozilla Developer Network https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API

Quick tutorial

  • Open a javascript console in a Web browser. This example uses Chrome. From the Chrome menu, select View | Developer | Javascript console
  • Type the following commands (in the shaded blocks) into the console:

Assign an instance of the Web Audio class to the object: context

context = new AudioContext();

Make an oscillator node

osc = context.createOscillator();

Connect the oscillator to the audio output (speaker)

osc.connect(context.destination);

Turn on the oscillator at the current time and plays a tone.

osc.noteOn(0);

Turn of the oscillator

osc.noteOff(0);

For more basics, see: “Using the Web Audio API”, at the Mozilla Developer Network: https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API/Using_Web_Audio_API

Basic html examples:

Demonstrated in class. Download from here: https://github.com/tkzic/web-audio-projects

  • Oscillator
  • Audio file player

HTML versions of examples from Boris Smus’s book: http://reactivemusic.net/?p=6094

Examples

Tutorials and references

Development (libraries, frameworks)

tz – examples

Assignment

Write a composition to induce magical effects.

Here is an example from Aseem Suri http://www.aseemsuri.com/journal/piece-of-mind-second-run-at-the-csound-conference 

The project was derived from computer technology, but the overall effect was that people would go into a mysterious room, for a minute, and when they emerged, they would be smiling and happy.

Due on December 15th (last class)

ep-413 DSP – week 11

Filters

fil5

Analog

fil12

Digital

Other

We usually think of filters in terms of frequency. Any process that removes information is a filter. Curation or abstraction, for example.

Reversability

examples

 

MBTA bus data in Max

Sonification of Mass Ave buses, from Harvard to Dudley.

Screen Shot 2014-11-11 at 3.26.16 PM

This patch sends requests to the MBTA developer portal to get the current location of buses – using the Max js object. Latitude and Longitude data is mapped to oscillator pitch. Data is polled every 10 seconds, but it seems like the results might be more interesting to poll at a slower rate, because the updates don’t seem that frequent. And buses tend to stop a lot.

MBTA developer portal: http://reactivemusic.net/?p=17511

Here is the get request URL used in the patch:

http://realtime.mbta.com/developer/api/v2/vehiclesbyroute?api_key=wX9NwuHnZU2ToO7GmGR9uw&route=01&format=json
download

https://github.com/tkzic/internet-sensors

folder: mbta

patches:

  • mbta.maxpat
  • mbta.js
  • poly-oscillator.maxpat
authentication

You will not need authentication to run run this patch. It uses the default developer API-key for testing. Please read the terms of service at the MBTA developer portal. Data should not be polled more often than 10 seconds. You can also request your own developer API key from MBTA.

instructions
  • Open mbta.maxpat
  • Toggle the metro (at the top of the patch) to start polling
  • Turn on the audio (at the bottom of the patch) and turn up the gain

Note: there will be more buses running during rush hours in Boston.  Try experimenting with the polling rate and ramp length in the poly-oscillator patch. Also, you can experiment with the pitch range.

 

data-stream-switch.maxpat

 

ep-413 DSP week 10

Music from data

seagulls

We looked at Vine API Examples from Eli and Steve H.

OSC (Open Sound Control)
  • Max udpsend, udpreceive, touchOsc, aka.speech
  • using a wifi router for performance projects

Using an Osc server to handle Internet API’s

Searchtweet (rate limited): http://reactivemusic.net/?p=17425

Max oggz streaming example: http://reactivemusic.net/?p=17504

We talked about cartoons: http://reactivemusic.net/?p=10091

Sonification
  • parameter mapping
  • modeling
  • earcons

We didn’t talk about alarm fatigue…

MBTA bus example in Max:

(parameter mapping sonification)

http://reactivemusic.net/?p=17524

  • documentation
  • API keys
  • JSON
  • Max example
Unsolved problems

Is it possible to generate music from data?

Audio streaming object in Max

oggrx~ and oggtx~

by Robin Gareus

At Cycling 74 forum: https://cycling74.com/forums/topic/streaming-internet-radio-in-maxmsp/

notes

I was able to receive mp3 files from a server in Max 6.18. using oggrx~. There doesn’t appear to be transport control – so this would need to be built in for synchronization.

Unexpected find: The external uses “secret rabbit code” for resampling. So it works in Max. And we have the source code but not the i386 libs that were used to compile it.

There is no binary for v.7 of oggrx~.mxo, but there is one for v.6

Original c74 post by umma08:

i managed to get Robin Gareus’ externals. They are available here, though they are unmaintained.

The binaries are still online at:

http://gareus.org/d/oggZmax-v0.6-i386.zip

http://gareus.org/d/oggZmax-v0.7-rc2-i386.zip

It’s been more than 3 years (OSX 10.5) since I last looked at it, it
should still work, but I don’t know. Please let me know if you encounter
any problems, so that I can warn others.

I don’t maintain this external anymore. I neither have a MAX/MSP
license, nor do I own any Apple devices. On the upside, complete
source-code is available from

http://gareus.org/gitweb/?p=maxmsp.git;a=snapshot;sf=tgz