The error message "ERROR : the parameter must be a constant value known at compile time (the node of the tree is not a float nor an int) » is (this time ((-;) quite explicit. It has to be known at compilation time, but the sound length is discovered only when the program actually starts and the file is loaded... so at runtime.
I don’t see an easy to do what you want for now. Stéphane > Le 25 sept. 2018 à 23:08, azvinz <[email protected]> a écrit : > > import("stdfaust.lib"); > > > // this triggers bass sample on each (very slow) pulse > process = bass, progressbargui : attach; > > trigger = ba.beat(120/32) : 1-_ ; > > playhead = (1:+~_*trigger: _*1); > > > sound = > soundfile("label[url:/media/sda7/Programming/Faust/Vinz4/bass.wav]",1) ; > bass = 0, playhead : sound : !,!,_; > > progressbar = 0,0 : sound : _,!,!; // get only the length of soundfile in > sample > > progressbargui = hbargraph("progress bar",0, progressbar); // put length of > soundfile as max value. Put an int instead of "progressbar" and it should work > > > > > On 09/25/2018 10:17 PM, Stéphane Letz wrote: >> show me the code…. >> >>> Le 25 sept. 2018 à 22:14, azvinz via Faudiostream-users >>> <[email protected]> a écrit : >>> >>> Hello Stéphane, >>> >>> I tried to put the sample length of a soundfile object into the maximum >>> value of a bargraph, but I get a compilation error. If there is a way to >>> make it work? this would be great, so one can use bargraphs as progress bar >>> for soundfiles. >>> >>> All the best >>> >>> Vince >>> >>> >>> >>> _______________________________________________ >>> Faudiostream-users mailing list >>> [email protected] >>> https://lists.sourceforge.net/lists/listinfo/faudiostream-users > _______________________________________________ Faudiostream-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/faudiostream-users
