Minim in Processing / Procoding

Home Forums Procoding Minim in Processing / Procoding

This topic contains 3 replies, has 2 voices, and was last updated by  audiocommander 1 year ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1380

    Madeline E

    Hey guys!

    Trying to create a kind of music visualizer that will draw graphics a user can then touch-manipulate in some way.

    The problem is– I can’t get music to be imported in my resources section of the .pde file / play. It says on your website that JavaScript libraries can be imported into sketches, but I can’t figure out how to import the Minim Library for Processing. I don’t have any problems uploading a .mp3 file into my resources, but if Minim isn’t present, it won’t play.

    Help– its basically the main point of my project! Really just need to be able to play music on the ipad and call on different aspects of a song.

    Thanks–urgent!

    #1381

    audiocommander
    Keymaster

    Hi Madeline,

    sorry – if nothing changed in the past year, then minim is still a JAVA library for Processing. Procoding uses a JavaScript version with Processing.js (JavaScript and Java are two totally different programming languages).

    While it’s true that you can add any JavaScript resource, you can’t add Java Resources. Thus, to my knowledge there’s no way to add minim as it is.

    However, it’s actually quite easy to add audio with JavaScript but not so straightforward to mix this in with Processing.js.

    I’m currently on the way and typing on my mobile, but I can provide you with some infos about alternatives the next days if that would be helpful. (IIRC there should also be an older topic about this here)

    Sorry for not having better news :(

    #1382

    Madeline E

    Hi!

    Thanks so much for the response.

    Yes, any sort of information of how to add separate audio files in any way to then display / hear them on a iPad would be incredibly helpful.

    Processing.JS could work too!

    #1383

    audiocommander
    Keymaster

    Hi again,

    as mentioned before, you are already using processing.js when using Procoding. It’s key to understand that Java and JavaScript are really two completely different things: JavaScript’s real name is actually ECMA Scripting Language. Java and JavaScript have as much in common as “car and carpet” (so it’s really just the “Java” in their names).

    Processing.js is basically a new implementation in JavaScript/ECMA to provide a basic compatibility with Processing (which is written in Java).

    Looking at the latest developments of Java and its removal from all major browsers (that used to run as Java Applets) and the recent patent issues raised by Oracle, I think it’s safe to assume that Java (and thus Processing) is about to become obsolete.

    Based on these facts, here are a couple of links/resources that should help you getting on the right track with audio:

    1) previous forum topic: http://www.audiocommander.de/blog/forums/topic/what-to-use-instead-of-processing-minim-lib/

    2) question on Stackoverflow with a link to a possible alternative for minim to be used with processing.js
    http://stackoverflow.com/questions/16879981/exporting-a-processing-sketch-with-audio-to-javascript
    and
    https://github.com/Pomax/Pjs-2D-Game-Engine/blob/master/minim.js
    (that might be the quickest option to just “make it work” quickly, by adding minim.js to your sketch resources)

    3) consider switching to a more modern JavaScript environment. I recommend to check out P5.js, which comes with P5.audio: https://p5js.org/libraries/ and provides a familiar interface for former Processing users.
    However, that would mean rewriting large parts of your code, but will be future forward and have better performance.
    In general, audio support is much better on the latest browser platforms from simple Audio playback to the quite complex and advanced HTML5 WebAudio API.

    Hope this helps,
    Best, Michael

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Minim in Processing / Procoding’ is closed to new replies.