Annonce

>>> Bienvenue sur codelab! >>> Première visite ? >>> quelques mots sur codelab //// une carte des membres//// (apéros) codelab


#1 2014-05-29 22:57:06 JACK et processing

imdidi
membre
Date d'inscription: 2012-10-05
Messages: 242

JACK et processing



Bonjours a tous

j ai besoin de faire marcher JACK pour envoyer le son de pure data a processing

coter pure data ses correct j ai réussi a le faire marcher 16 canaux

mais coter Processing comment on fait pour faire reconnaitre Processing a JACK

sois avec la library MINIM ou BEAN

J ai lu que on pouvais passer par jjack mais je suis sous Windows et sa l air faite pour linux ou mac os je sais pas trop je ne comprend pas trop la manipulation a faire meton que ses pas très bien expliquer pour moi en tous cas

merci
danny

Hors ligne

 

#2 2014-05-30 06:48:01 Re : JACK et processing

Mushussu
membre
Lieu: Orléans
Date d'inscription: 2012-05-24
Messages: 802

Re: JACK et processing



Bonjour,

Voici ce que j'avais fait pour MacOSX :
http://wiki.labomedia.org/index.php/Aud … avec_Beads

Tu peux je pense t'en inspirer.

Bon courage.

Hors ligne

 

#3 2014-05-30 14:57:58 Re : JACK et processing

imdidi
membre
Date d'inscription: 2012-10-05
Messages: 242

Re: JACK et processing



salut mushussu

merci de ta reponse oui javais deja vue ce site

mais javais le probleme de ou je met les fichier sous windows


/lib/jjack.jar (lui jimagine dans library de processing)
/lib/macosx/libjjack.jnilib (lui jen ai aucune idee)
dans le répertoire/Utilisateurs/{Nom_Utilisateur}/Bibliothèque/Java/Extension ( et lui encore moins)

Ensuite les manipulation dans le fichier preference  se font de la meme facon que sous mac ?
me semble que ses la premiere fois que je gosse comme sa pour installer dequoi par apport a processing

Merci
danny

Dernière modification par imdidi (2014-05-30 15:27:23)

Hors ligne

 

#4 2014-05-30 16:32:17 Re : JACK et processing

imdidi
membre
Date d'inscription: 2012-10-05
Messages: 242

Re: JACK et processing



re bonjour a tous

je viens de trouver le fichier préférence de processing

/Utilisateurs/{Nom_Utilisateur}/Bibliothèque/Processing/preferences.txt

en réalité sous Windows

il est dans C:/utilisateur/(nom de l utilisateur/appdata/roaming/processing/preference.txt

ma question sous mac le chemin d’accès pour java est

/Utilisateurs/{Nom_Utilisateur}/Bibliothèque/Java/Extensions

sachant que pour mac les fichier son tous dans bibliothèque cela veux tu nécessairement dire que dans mon cas sous Windows elle vont tous dans roaming car dans roaming je n ai pas de java

le seul dossier java que j ai il faut que je remonte le répertoire jusqu 'a appdata alors
C:/utilisateur/(nom de l utilisateur/appdata/locallow/sun/java
dans ce dossier il y a ext mais pas extensions est-ce la qu il faut que je mette les fichier de jjack ?

merci de m éclairer
danny

Hors ligne

 

#5 2014-05-31 02:53:19 Re : JACK et processing

imdidi
membre
Date d'inscription: 2012-10-05
Messages: 242

Re: JACK et processing



non j ai meme essayer de l installer sur linux

jarrive pas a comprendre la manipulation a suivre

il n y a pas une autre solution a jjack pour utiliser JACK avec Processing ?

Hors ligne

 

#6 2014-05-31 07:01:17 Re : JACK et processing

imdidi
membre
Date d'inscription: 2012-10-05
Messages: 242

Re: JACK et processing



Bon j ai réussi a le faire marcher sous Linux

mais mon problème maintenant ses que je n ai que 2 canal et j en ai besoin de 16

j ai modifier le fichier préférence.txt qui est désormais default.txt dans la dernière version j ai mis cette ligne:

run.options=-Djjack.client.name=Processing -Djjack.ports.out=1 -Djjack.ports.in=16-Djjack.ports.out.autoconnect=true

ensuite j ai pris le code dans la section exemple de la librairie bead (audioContext) ;

import beads.*;
import java.util.Arrays; 

/*
 * Lesson 1: Make some noise! Note, if you don't know Processing, you'd
 * be well advised to follow some of the Processing tutorials first.
 */
 
AudioContext ac;

void setup() {
  size(300,300);
  /*
   * Make an AudioContext. This class is always the starting point for 
   * any Beads project. You need it to define various things to do with 
   * audio processing. It also connects the the JavaSound system and
   * provides you with an output device.
   */
   ac = new AudioContext();
  /* 
   * Make a noise-making object. Noise is a type of Class known as a
   * UGen. UGens have some number of audio inputs and audio outputs
   * and do some kind of audio processing or generation. Notice that
   * UGens always get initialised with the AudioContext.
   */
  Noise n = new Noise(ac);
  /* 
   * Make a gain control object. This is another UGen. This has a few
   * more arguments in its constructor: the second argument gives the
   * number of channels, and the third argument can be used to initialise
   * the gain level.
   */
  Gain g = new Gain(ac, 1, 0.1);
  /*
   * Now things get interesting. You can plug UGens into other UGens, 
   * making chains of audio processing units. Here we're just going to
   * plug the Noise object into the Gain object, and the Gain object
   * into the main audio output (ac.out). In this case, the Noise object
   * has one output, the Gain object has one input and one output, and
   * the ac.out object has two inputs. The method addInput() does its
   * best to work out what to do. For example, when connecting the Gain
   * to the out object, the output of the Gain object gets connected to
   * both channels of the output object.
   */
  g.addInput(n);
  ac.out.addInput(g);
  /*
   * Finally, start things running.
   */
  ac.start();
}

/*
 * Here's the code to draw a scatterplot waveform.
 * The code draws the current buffer of audio across the
 * width of the window. To find out what a buffer of audio
 * is, read on.
 * 
 * Start with some spunky colors.
 */
color fore = color(255, 102, 204);
color back = color(0,0,0);

/*
 * Just do the work straight into Processing's draw() method.
 */
void draw() {
  loadPixels();
  //set the background
  Arrays.fill(pixels, back);
  //scan across the pixels
  for(int i = 0; i < width; i++) {
    //for each pixel work out where in the current audio buffer we are
    int buffIndex = i * ac.getBufferSize() / width;
    //then work out the pixel height of the audio data at that point
    int vOffset = (int)((1 + ac.out.getValue(0, buffIndex)) * height / 2);
    //draw into Processing's convenient 1-D array of pixels
    vOffset = min(vOffset, height);
    pixels[vOffset * height + i] = fore;
  }
  updatePixels();
}

si je pèse sur play sa fonctionne mais juste 2 in et 2 out

si je remplace la ligne

ac = new AudioContext();

par

AudioContext ac = new AudioContext(AudioContUext.defaultAudioFormat(16,1));

j ai le droit a une belle erreur qui me dit ''the constructor AudioContext(IOAudioFormat) is undefined

et si je remplace la ligne par

ac = new AudioContext();
ac.defaultAudioFormat(8,4);

je n ai plus d erreur mais j ai toujours 2 canaux

quelqu’un pourrais m éclairer stp
merci

Dernière modification par imdidi (2014-05-31 07:06:09)

Hors ligne

 

#7 2014-05-31 10:48:57 Re : JACK et processing

NaKroTeK
membre
Date d'inscription: 2014-05-15
Messages: 21

Re: JACK et processing



Bonjour,

defautAudioFormat retourne  IOAudioFormat

les différent construcuteurs sont :

1- AudioContext()
    This constructor creates the default AudioContext, which means net.beadsproject.beads.core.io.JavaSoundAudioIO if it can find it, or net.beadsproject.beads.core.io.NonrealtimeIO otherwise.

2-AudioContext(AudioIO ioSystem)
    Creates a new AudioContext with default audio format and buffer size and the specified AudioIO.

3-AudioContext(AudioIO ioSystem, int bufferSizeInFrames)
    Creates a new AudioContext with default audio format and the specified buffer size and AudioIO.

4-AudioContext(AudioIO ioSystem, int bufferSizeInFrames, IOAudioFormat audioFormat)
    Creates a new AudioContext with the specified buffer size, AudioIO and audio format.

Test les infos avec :
ac.postAudioFormatInfo()  ------- ac ton objet AudioContext
Prints AudioFormat information to System.out.


Peut-être que définir le IOAudioFormat peut résoudre le problème:
IOAudioFormat mesSeizeEntrees = new IOAudioFormat(float sampleRate, int bitDepth, int inputs, int outputs);
AudioContext ac = new AudioContext(AudioIO ioSystem,int bufferSizeInFrames, mesSeizeEntrees);


A bientôt

Hors ligne

 

#8 2014-06-01 00:52:52 Re : JACK et processing

imdidi
membre
Date d'inscription: 2012-10-05
Messages: 242

Re: JACK et processing



non sa marche pas

mais en réessayant le code donner pas mushussu

je suis tomber sur une autre erreur
voici le code :

jai maintenant le droit a l'erreur :
the method defaultAudioFormat(int,int) in the type AudioContext() is not applicable for the argument (int)

et si je rajoute le deuxieme int
the constructor AudioContext(IOaudioFormat) is undifined

Hors ligne

 

#9 2014-06-01 01:16:06 Re : JACK et processing

NaKroTeK
membre
Date d'inscription: 2014-05-15
Messages: 21

Re: JACK et processing



heuuuuuu,

comment dire : http://www.beadsproject.net/doc/net/bea … ,%20int%29

DefaultAudioFormat retourne un IOStream, tu le mets dans un constructeur qui en fera rien comme ça....

tu peux essayer d'avoir l'objet d'initialiser avec le Constructeur par défaut, et de modifier ensuite le nombre de port entrées/sorties peut-être ?

Hors ligne

 

#10 2014-06-01 01:44:59 Re : JACK et processing

imdidi
membre
Date d'inscription: 2012-10-05
Messages: 242

Re: JACK et processing



en fesant sa comme sa

ac = new AudioContext();
   ac.defaultAudioFormat(4,4);

je n'ai plus d'erreur mais j ai toujours que 2 canal

Hors ligne

 

#11 2014-06-02 11:41:08 Re : JACK et processing

NaKroTeK
membre
Date d'inscription: 2014-05-15
Messages: 21

Re: JACK et processing



run.options=-Djjack.client.name=Processing -Djjack.ports.out=1 -Djjack.ports.in=16-Djjack.ports.out.autoconnect=true

Il manque un espace peut-être après le 16 ?

version corrigée :

run.options=-Djjack.client.name=Processing -Djjack.ports.out=1 -Djjack.ports.in=16 -Djjack.ports.out.autoconnect=true

Hors ligne

 

#12 2014-06-03 00:19:07 Re : JACK et processing

imdidi
membre
Date d'inscription: 2012-10-05
Messages: 242

Re: JACK et processing



effectivement il y avais un erreur
je lai corriger mais sans succès je suis en train de me dire que sa ne marchera jamais ....

check ma vous transmette toute les code comme sa vous pourrez voir si il y a un problème
alors le fichier default.txt est dans :
/usr/share/processing/processing-2.2.1/lib

le code du fichier default est:

# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

# DO NOT MAKE CHANGES TO THIS FILE!!! 

# These are the default preferences. If you want to modify 
# them directly, use the per-user local version of the file:

# Documents and Settings -> [username] -> Application Data -> 
#    Processing -> preferences.txt (on Windows XP)

# Users -> [username] -> AppData -> Roaming -> 
#    Processing -> preferences.txt (on Windows Vista and 7)

# ~/Library -> Processing -> preferences.txt (on Mac OS X)

# ~/.processing -> preferences.txt (on Linux)

# The exact location of your preferences file can be found at
# the bottom of the Preferences window inside Processing.

# Because AppData and Application Data may be considered 
# hidden or system folders on Windows, you'll have to ensure
# that they're visible in order to get at preferences.txt

# You'll have problems running Processing if you incorrectly 
# modify lines in this file. It will probably not start at all.

# AGAIN, DO NOT ALTER THIS FILE! I'M ONLY YELLING BECAUSE I LOVE YOU!


# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


# DEFAULT PATHS FOR SKETCHBOOK AND SETTINGS

# relative paths will be relative to processing.exe or processing.app.
# absolute paths may also be used.

# note that this path should use forward slashes (like unix)
# instead of \ on windows or : on macos or whatever else

# If you don't want users to have their sketchbook default to 
# "My Documents/Processing" on Windows and "Documents/Processing" on OS X, 
# set this to another path that will be used by default. 
# Note that this path must exist already otherwise it won't see
# the sketchbook folder, and will instead assume the sketchbook
# has gone missing, and that it should instead use the default.
#sketchbook.path=

# if you don't want settings to go into "application data" on windows
# and "library" on macosx, set this to the alternate location.
#settings.path=data

# By default, no sketches currently open
last.sketch.count=0

# true if you want sketches to re-open when you next run processing
last.sketch.restore=true

# by default, contributions are moved to backup folders when
# they are removed or replaced. The locations of the backup
# folders are:
#              sketchbook/libraries/old
#              sketchbook/tools/old
#              sketchbook/modes/old
# true to backup contributions when "Remove" button is pressed
contribution.backup.on_remove = true
# true to backup contributions when installing a newer version
# (for example, from a plb file)
contribution.backup.on_install = true

recent.count = 10

# Default to the native (AWT) file selector where possible
chooser.files.native = true
# native Linux file chooser is atrocious, use Swing instead
chooser.files.native.linux = false


# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


# by default, check the processing server for any updates
# (please avoid disabling, this also helps us know basic numbers 
# on how many people are using Processing)
update.check = true

# on windows, automatically associate .pde files with processing.exe
platform.auto_file_type_associations = true

# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


# default size for the main window
editor.window.width.default = 500
editor.window.height.default = 600

editor.window.width.min = 400
editor.window.height.min = 500
# tested as approx 440 on OS X
editor.window.height.min.macosx = 450
# tested to be 515 on Windows XP, this leaves some room
editor.window.height.min.windows = 530

# font size for editor
#editor.font = Monospaced,plain,12
# Monaco is nicer on Mac OS X, so use that explicitly
#editor.font.macosx = Monaco,plain,10
# trying for a built-in, consistent monospace for 2.0
#editor.font = processing.mono,plain,12
editor.font.family = Source Code Pro
editor.font.size = 12

# To reset everyone's default, replaced editor.antialias with editor.smooth 
# for 2.1. Fonts are unusably gross on OS X (and Linux) w/o smoothing and 
# the Oracle JVM, and many longtime users have anti-aliasing turned off.
editor.smooth = true

# blink the caret by default
editor.caret.blink = true
# change to true to use a block (instead of a bar)
editor.caret.block = false

# enable ctrl-ins, shift-ins, shift-delete for cut/copy/paste
# on windows and linux, but disable on the mac
editor.keys.alternative_cut_copy_paste = true
editor.keys.alternative_cut_copy_paste.macosx = false

# true if shift-backspace sends the delete character, 
# false if shift-backspace just means backspace
editor.keys.shift_backspace_is_delete = false

# home and end keys should only travel to the start/end of the current line
editor.keys.home_and_end_travel_far = false
# home and end keys move to the first/last non-whitespace character,
# and move to the actual start/end when pressed a second time. 
# Only works if editor.keys.home_and_end_travel_far is false.
editor.keys.home_and_end_travel_smart = true
# The OS X HI Guidelines say that home/end are relative to the document, 
# but that drives some people nuts. This pref enables/disables it.
editor.keys.home_and_end_travel_far.macosx = true

# Enable/disable support for complex scripts. Used for Japanese and others, 
# but disable when not needed, otherwise basic Western European chars break.
editor.input_method_support = false

# convert tabs to spaces? how many spaces?
editor.tabs.expand = true
editor.tabs.size = 2

# automatically indent each line
editor.indent = true

# size of divider between editing area and the console
editor.divider.size = 0
# the larger divider on windows is ugly with the little arrows
# this makes it large enough to see (mouse changes) and use, 
# but keeps it from being annoyingly obtrusive
editor.divider.size.windows = 2

# Hide the background image. Gross because this is a pref that
# really lives over in theme.txt but it's split here.
buttons.hide.image = false
toolbar.hide.image = false

# font choice and size for the console
#console.font = Monospaced,plain,11
#console.font.macosx = Monaco,plain,10
#console.font = processing.mono,plain,12
console.font.size = 12

# number of lines to show by default
console.lines = 4

# set to false to disable automatically clearing the console
# each time 'run' is hit
console.auto_clear = true

# set the maximum number of lines remembered by the console
# the default is 500, lengthen at your own peril
console.length = 500

# Any additional Java options when running. 
# If you change this and can't run things, it's your own durn fault.
run.options =-Djjack.client.name=Processing -Djjack.ports.out=16 -Djjack.ports.in=16 -Djjack.ports.out.autoconnect=true  //ici 

# settings for the -XmsNNNm and -XmxNNNm command line option
run.options.memory = false
run.options.memory.initial = 64
run.options.memory.maximum = 256

# By default, Mac OS X 10.6 launches applications in 32-bit mode, 
# which is more compatible with libraries (many have not updated to 64-bit).
# Changing this doesn't do anything on other platforms. 
run.options.bits.macosx = 32

# Index of the display to use for running sketches (starts at 1). 
# Kept this 1-indexed because older vesions of Processing were setting
# the preference even before it was being used.
run.display = 0

# set internally
#run.window.bgcolor=

# set to false to open a new untitled window when closing the last window
# (otherwise, the environment will quit)
# default to the relative norm for the different platforms, 
# but the setting can be changed in the prefs dialog anyway
#sketchbook.closing_last_window_quits = true
#sketchbook.closing_last_window_quits.macosx = false

editor.untitled.prefix=sketch_
# The old (pre-1.0, back for 2.0) style for default sketch name.
# If you change this, be careful that this will work with your language 
# settings. For instance, MMMdd won't work on Korean-language systems 
# because it'll insert non-ASCII characters and break the environment.
# http://code.google.com/p/processing/issues/detail?id=283
editor.untitled.suffix=yyMMdd

# Set the default look & feel on Linux to something other than 
# the 'native' platform default, which is usually Metal (yuck!)
# GTK isn't for everyone (and KDE users will get Metal or some
# such anyway, so this is now broken out as an option
# Linux is by default even uglier than metal (Motif?).
# Actually, i'm using native menus, so they're even uglier
# and Motif-looking (Lesstif?). Ick. Need to fix this.
# For 0120, trying out the gtk+ look and feel as the default.
# This is available in Java 1.4.2 and later, and it can't possibly
# be any worse than Metal. (Ocean might also work, but that's for
# Java 1.5, and we aren't going there yet)
editor.laf.linux = com.sun.java.swing.plaf.gtk.GTKLookAndFeel


# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


# TEXT - KEYWORDS, LITERALS
# For an explanation of these tags, see Token.java:
# processing/app/src/processing/app/syntax/Token.java

editor.token.function1.style = #006699,plain
editor.token.function2.style = #006699,plain
editor.token.function3.style = #669900,plain
editor.token.function4.style = #006699,bold

editor.token.keyword1.style = #33997e,plain
editor.token.keyword2.style = #33997e,plain
editor.token.keyword3.style = #669900,plain
editor.token.keyword4.style = #d94a7a,plain
editor.token.keyword5.style = #e2661a,plain

editor.token.literal1.style = #7D4793,plain
editor.token.literal2.style = #718a62,plain

editor.token.operator.style = #006699,plain

editor.token.label.style = #666666,bold

editor.token.comment1.style = #666666,plain
editor.token.comment2.style = #666666,plain

editor.token.invalid.style = #666666,bold


# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


# which platforms to export by default
#export.application.platform.windows = true
#export.application.platform.macosx = true
#export.application.platform.linux = true

# whether or not to export as full screen (present) mode
export.application.fullscreen = false

# whether to show the stop button when exporting to application
export.application.stop = true

# embed Java by default for lower likelihood of problems
export.application.embed_java = true

# set to false to no longer delete applet or application folders before export
export.delete_target_folder = true

# may be useful when attempting to debug the preprocessor
preproc.save_build_files=false

# allows various preprocessor features to be toggled 
# in case they are causing problems

# preprocessor: pde.g
preproc.color_datatype = true
preproc.web_colors = true
preproc.enhanced_casting = true

# preprocessor: PdeEmitter.java
preproc.substitute_floats = true
#preproc.substitute_image = false
#preproc.substitute_font = false

# auto-convert non-ascii chars to unicode escape sequences
preproc.substitute_unicode = true

# PdePreproc.java
# writes out the parse tree as parseTree.xml, which can be usefully
# viewed in (at least) Mozilla or IE.  useful when debugging the preprocessor.
preproc.output_parse_tree = false

# Changed after 2.0b6 to remove those that aren't compatible with Android, 
# as we move to the new built-in event types. Also remove .list from the end
# of the name, so that the pref will reset. These are now the same imports
# as are used over on the Android side.
# Changed again for revision 0215 (around 2.0b7) to remove all default 
# imports that aren't covered by the reference. This has been done to improve
# overall cross-platform parity and to avoid users unknowingly adding 
# Java classes, and then the sadness that comes when switching to Android
# or JavaScript modes.
#preproc.imports.list = java.applet.*,java.awt.Dimension,java.awt.Frame,java.awt.event.MouseEvent,java.awt.event.KeyEvent,java.awt.event.FocusEvent,java.awt.Image,java.io.*,java.net.*,java.text.*,java.util.*,java.util.zip.*,java.util.regex.*
#preproc.imports = java.io.*,java.net.*,java.text.*,java.util.*,java.util.zip.*,java.util.regex.*
#preproc.imports = java.io.*,java.util.*

# set to the program to be used for opening HTML files, folders, etc.
#launcher.linux = xdg-open

# FULL SCREEN (PRESENT MODE)
run.present.bgcolor = #666666
run.present.stop.color = #cccccc
# Starting in 2.0a6, don't use FSEM at all, embed native lib to hide menubar
# starting in release 0159, don't use full screen exclusive anymore
#run.present.exclusive = false
# use this by default to hide the menu bar and dock on osx
#run.present.exclusive.macosx = true

# HTTP PROXY
# Set a proxy server for folks that require it. This will allow the update
# checker and the contrib manager to run properly in those environments.
#proxy.host=proxy.example.com
#proxy.port=8080
proxy.host=
proxy.port=

ensuite j ai un fichier test sur le bureau dedans j ai test.pde et code dans le fichier code jjack.jar
alors: /Bureau/test/test/test.pde ET code/jjack.jar

et le code de test.pde

import beads.*;
import java.util.Arrays; 

/*
 * Lesson 1: Make some noise! Note, if you don't know Processing, you'd
 * be well advised to follow some of the Processing tutorials first.
 */
 
AudioContext ac;

void setup() {
  size(300,300);
  /*
   * Make an AudioContext. This class is always the starting point for 
   * any Beads project. You need it to define various things to do with 
   * audio processing. It also connects the the JavaSound system and
   * provides you with an output device.
   */
   ac = new AudioContext();
   ac.defaultAudioFormat(16,16);
  /* 
   * Make a noise-making object. Noise is a type of Class known as a
   * UGen. UGens have some number of audio inputs and audio outputs
   * and do some kind of audio processing or generation. Notice that
   * UGens always get initialised with the AudioContext.
   */
  Noise n = new Noise(ac);
  /* 
   * Make a gain control object. This is another UGen. This has a few
   * more arguments in its constructor: the second argument gives the
   * number of channels, and the third argument can be used to initialise
   * the gain level.
   */
  Gain g = new Gain(ac, 1, 0.1);
  /*
   * Now things get interesting. You can plug UGens into other UGens, 
   * making chains of audio processing units. Here we're just going to
   * plug the Noise object into the Gain object, and the Gain object
   * into the main audio output (ac.out). In this case, the Noise object
   * has one output, the Gain object has one input and one output, and
   * the ac.out object has two inputs. The method addInput() does its
   * best to work out what to do. For example, when connecting the Gain
   * to the out object, the output of the Gain object gets connected to
   * both channels of the output object.
   */
  g.addInput(n);
  ac.out.addInput(g);
  /*
   * Finally, start things running.
   */
  ac.start();
}

/*
 * Here's the code to draw a scatterplot waveform.
 * The code draws the current buffer of audio across the
 * width of the window. To find out what a buffer of audio
 * is, read on.
 * 
 * Start with some spunky colors.
 */
color fore = color(255, 102, 204);
color back = color(0,0,0);

/*
 * Just do the work straight into Processing's draw() method.
 */
void draw() {
  loadPixels();
  //set the background
  Arrays.fill(pixels, back);
  //scan across the pixels
  for(int i = 0; i < width; i++) {
    //for each pixel work out where in the current audio buffer we are
    int buffIndex = i * ac.getBufferSize() / width;
    //then work out the pixel height of the audio data at that point
    int vOffset = (int)((1 + ac.out.getValue(0, buffIndex)) * height / 2);
    //draw into Processing's convenient 1-D array of pixels
    vOffset = min(vOffset, height);
    pixels[vOffset * height + i] = fore;
  }
  updatePixels();
}

ensuite dans linux je clique sur application son et video QjackCtl
dans Q-jackCtl je clique sur démarrer j ouvre processing et clique sur run
je vois bien jjack dans QJACKCTL mais 2 canaux uniquement

j ai aussi voulu le re compiler mais quand je lance:
ant -buildfile build.xml

jai cette erreur:

Buildfile: /home/danny/Bureau/jjack-0.3/make/build.xml

clean:
   [delete] Deleting directory /home/danny/Bureau/jjack-0.3/classes
   [delete] Deleting directory /home/danny/Bureau/jjack-0.3/doc/api

init:

javac:
    [mkdir] Created dir: /home/danny/Bureau/jjack-0.3/classes
    [javac] /home/danny/Bureau/jjack-0.3/make/build.xml:54: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
    [javac] Compiling 64 source files to /home/danny/Bureau/jjack-0.3/classes
    [javac] warning: [options] bootstrap class path not set in conjunction with -source 1.4
    [javac] 1 warning
    [mkdir] Created dir: /home/danny/Bureau/jjack-0.3/classes/de/gulden/application/jjack/res
     [copy] Copying 1 file to /home/danny/Bureau/jjack-0.3/classes/de/gulden/application/jjack/res
    [mkdir] Created dir: /home/danny/Bureau/jjack-0.3/classes/de/gulden/application/jjack/clients/res
     [copy] Copying 9 files to /home/danny/Bureau/jjack-0.3/classes/de/gulden/application/jjack/clients/res
    [mkdir] Created dir: /home/danny/Bureau/jjack-0.3/classes/META-INF/services
     [copy] Copying 1 file to /home/danny/Bureau/jjack-0.3/classes/META-INF/services

javadoc:
    [mkdir] Created dir: /home/danny/Bureau/jjack-0.3/doc/api
  [javadoc] Generating Javadoc
  [javadoc] Javadoc execution
  [javadoc] Loading source files for package com.petersalomonsen.jjack.javasound...
  [javadoc] Loading source files for package de.gulden.framework.jjack...
  [javadoc] Loading source files for package de.gulden.framework.jjack.util...
  [javadoc] Loading source files for package de.gulden.util.nio...
  [javadoc] Constructing Javadoc information...
  [javadoc] Standard Doclet version 1.7.0_51
  [javadoc] Building tree for all the packages and classes...
  [javadoc] /home/danny/Bureau/jjack-0.3/src/com/petersalomonsen/jjack/javasound/JJackMixer.java:99: warning - @Override is an unknown tag.
  [javadoc] /home/danny/Bureau/jjack-0.3/src/com/petersalomonsen/jjack/javasound/JJackMixerProvider.java:60: warning - @Override is an unknown tag.
  [javadoc] /home/danny/Bureau/jjack-0.3/src/com/petersalomonsen/jjack/javasound/JJackMixerProvider.java:68: warning - @Override is an unknown tag.
  [javadoc] Building index for all the packages and classes...
  [javadoc] Building index for all classes...
  [javadoc] Generating /home/danny/Bureau/jjack-0.3/doc/api/help-doc.html...
  [javadoc] 3 warnings

javah:

BUILD FAILED
/home/danny/Bureau/jjack-0.3/make/build.xml:95: Execute failed: java.io.IOException: Cannot run program "/home/danny/Bureau/jjack-0.3/${env.JAVA_HOME}/bin/javah" (in directory "/home/danny/Bureau/jjack-0.3"): error=2, Aucun fichier ou dossier de ce type
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1041)
	at java.lang.Runtime.exec(Runtime.java:617)
	at org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.exec(Execute.java:862)
	at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:481)
	at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:495)
	at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:631)
	at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:672)
	at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:498)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
	at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at org.apache.tools.ant.Target.execute(Target.java:390)
	at org.apache.tools.ant.Target.performTasks(Target.java:411)
	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
	at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
	at org.apache.tools.ant.Main.runBuild(Main.java:809)
	at org.apache.tools.ant.Main.startAnt(Main.java:217)
	at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
	at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Caused by: java.io.IOException: error=2, Aucun fichier ou dossier de ce type
	at java.lang.UNIXProcess.forkAndExec(Native Method)
	at java.lang.UNIXProcess.<init>(UNIXProcess.java:135)
	at java.lang.ProcessImpl.start(ProcessImpl.java:130)
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1022)
	... 23 more

Total time: 8 seconds

si vous voyez un probleme faite moi en part stp sa fais asser longtemps que je suis rebutter a ce probleme
merci

Dernière modification par imdidi (2014-06-03 03:40:08)

Hors ligne

 

#13 2014-06-03 11:08:36 Re : JACK et processing

NaKroTeK
membre
Date d'inscription: 2014-05-15
Messages: 21

Re: JACK et processing



Si tu as du son qui sort de 2 channels, la partie Jack doit être ok...

bon sinon tu modifies le fichier default  :

# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

# DO NOT MAKE CHANGES TO THIS FILE!!! 

# These are the default preferences. If you want to modify 
# them directly, use the per-user local version of the file:

# Documents and Settings -> [username] -> Application Data -> 
#    Processing -> preferences.txt (on Windows XP)

# Users -> [username] -> AppData -> Roaming -> 
#    Processing -> preferences.txt (on Windows Vista and 7)

# ~/Library -> Processing -> preferences.txt (on Mac OS X)

# ~/.processing -> preferences.txt (on Linux)

essaye plutôt de modifier le preference.txt (peut-être il est caché.)

et vois tu bien toutes tes entrées dans Jack ?

Hors ligne

 

#14 2014-06-03 13:28:32 Re : JACK et processing

imdidi
membre
Date d'inscription: 2012-10-05
Messages: 242

Re: JACK et processing



oui jai du son sur les 2 canaux

pour preference.txt je vais essayer de le trouver mais je crois qu il a changer de nom pour default.txt dans la ou dans les derniere version de processing

Dernière modification par imdidi (2014-06-03 13:28:49)

Hors ligne

 

#15 2014-06-03 14:17:09 Re : JACK et processing

NaKroTeK
membre
Date d'inscription: 2014-05-15
Messages: 21

Re: JACK et processing



je viens de l'installer sur OS X, le fichier existe.

Hors ligne

 

fil rss de cette discussion : rss

Pied de page des forums

Powered by FluxBB

codelab, graphisme & code : emoc / 2008-2024