gibber-cc / gibber Goto Github PK
View Code? Open in Web Editor NEWAn audiovisual live coding environment for the browser
License: MIT License
An audiovisual live coding environment for the browser
License: MIT License
Happy to fix it via a pull request unless you have any objections
Hi there,
I use a Mac with a French keyboard. I cannot execute the ctrl+. command.
Accessing the . symbol requires pressing the shift key. The other symbol on that key (the oe you get whenn you don't hold shift) is ; so we will call this the ;/. key. Pressing the ctl key makes the ;/. key revert to ; even when shift is pressed.
I'm not sure what the most elegant way of fixing this is. I suggest accepting ctl+; as an alternative to ctl+.
Great program !
Peter
for the lfo() function, sine and triangle waves are bipolar whereas saw and square waves are unipolar
s = Synth()
s.note.seq([0,1,2,3], 1/4)
s.gain = lfo('sin', btof(1), 0.3, 0.) //twice as fast
s.gain = lfo('sin', btof(1), 0.3, 0.3)
s.gain = lfo('square', btof(1), 0.3, 0.)
s.gain = lfo('saw', btof(1), 0.3, 0.)
s.gain = lfo('triangle', btof(1), 0.3, 0.3) //bipolar as well
I'm trying to access gibber at http://gibber.mat.ucsb.edu/ but it looks to be down:
→ ping gibber.mat.ucsb.edu
PING gibber.mat.ucsb.edu (128.111.26.157): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
Request timeout for icmp_seq 3
Is it being moved? thanks!
Evaluating code such as
a = XOX('x-o-x-o-')
cubes = [];
for (var i=0;i<3; i++) {
var ob = Cube();
ob.rotation.z = 2*Math.PI*i/3;
cubes[i] = ob;
}
for (var i=0; i<cubes.length; i++) {
cubes[i].rotation.x = a.snare.Out;
}
results in an error as the code tries to push a new mapping to undefined target.object.mappings
.
This is running the version at http://gibber.mat.ucsb.edu/
How does this work on mobile devices? Just tried some audio examples on iOS mobile browser and must say....performance is dreadfully slow and sluggish to the point of being unresponsive
ctrl+H key binding does not "eat" the event, so in my case, the browser opens the history, which is the default key binding
I've tested this both on chrome on PC and linux and Safari on mac.
Consider
a = Cube()
a.position.x = 20
a.position.x = 0
Executing the last line does not have the expected result; presumably the 0 is treated as undefined
or similar at some point. This may be trivial to fix, I might take a look and issue a pull request if I have any luck.
Cheers
Hi,
Am I correct in thinking FreeSound functionality is no longer working in Gibber? If I try to run the tutorial example I get the error 'TypeError: Cannot read property 'protocol' of undefined'.
I found this discussion post from 2015 but the error in question appears to be different. Has the API just been inaccessible by Gibber since then? I'm a bit late to the party I see. ;)
Thanks for your work on this, it's an amazing bit of software and I'm sad I didn't get into it when it had more active users!
Only seems to have a problem with 2 hits across more than 4 beats:
bd = Kick()
.trigger.seq(1, Euclid(2,8)/* 10100000 */)
This example seems to play a half tone higher on a old Mac ( with Mojave and Chrome ) than on a recent PC ( with Windows 10 and Chrome too ).
I haven't checked with a tuner which one is correct - if any.
Clock.bpm = 82
Theory.root = 'b2'
Theory.mode = 'ionian'
verb = Bus2('spaceverb')
//Synth defs
{
pad = PolySynth('stringPad', {gain:0.1})
pad.connect(verb, .7).connect()
sprinkle = Monosynth('pluck', {antialias:true, attack: audio => audio.Clock.ms(2), decay: 1/24, Q: 0.9, cutoff:0.1})
sprinkle.connect( verb, .6 ).connect()
pluck = Monosynth('pluck', {gain:.2})
pluck.connect( verb, .35 ).connect()
bass = Monosynth('bassPad', {decay:2})
bass.connect(verb, 0.35).connect()
drums= Drums()
drums.connect(verb, 0.1).connect()
}
drums.tidal('[kd kd ~~~~~~]*2')
sprinkle.octave = 3
sprinkle.note.seq([0,2,4,6,7,7,6,4,2,0], 1/36)
sprinkle.gain.fade(0.2, 0, 2)
pad.chord.seq([[0,2,4,6]], 3)
pluck.cutoff.fade(0,1,4)
pluck.note.seq([0,2,4,6,7,6,4,2],1/16)
bass.note.seq([14],1)
Right now a workaround is to wrap scaling parameters in Clock.time() - but it would be better if it were able to parse the output of lfo() as seconds instead of samples
s = Synth()
s.note.seq([0,1,2,3], 1/4)
s.decay= lfo('triangle', btof(8), Clock.time( 0.4 ), Clock.time( 0.42) )
Hi! No matter if I use or not the gibber library, as soon as I load it: (and nothing else, no command, nothing at all)
script type="text/javascript" src="js/p5.gibber.min.js"></script>
My form stops working properly: (mails don't get out and the error/success message dont' appear)
div id="error">
form class="estilo">
p>
div id="success">
form class="estilo">
p>
form id="contact" class="estilo" name="contact" method="post" novalidate="novalidate">
fieldset>
label for="name" id="name"> *
/label>
input type="text" name="name" id="name" size="30" value="" placeholder="Nombre" required="">
label for="email" id="email"> */span>
/label>
input type="text" name="email" id="email" size="30" value="" placeholder="Email" required="">
label for="Message" id="message"> */span>
/label>
textarea name="message" id="message" placeholder="Mensaje" required=""></textarea>
input id="submit" type="submit" name="submit" value="">
/fieldset>
/form>
?php
$to = "[email protected]";
$from = $_REQUEST['email'];
$name = $_REQUEST['name'];
$headers = "From: $from";
$subject = "CONSULTA!!!";
$fields = array();
$fields{"name"} = "Nombre";
$fields{"email"} = "Mail";
$fields{"message"} = "Mensaje";
$body = "Here is what was sent:\n\n"; foreach($fields as $a => $b){ $body .= sprintf("%20s: %s\n",$b,$_REQUEST[$a]); }
$send = mail($to, $subject, $body, $headers);
I'm using gibber to sonorize my web and works fine (4 lines of code), but i would like to have both the gibber and the contact form working properly.
Couldn't trace where the issue is.
Any help would be awesome.
Thanks!
In http://gibber.cc/docs/index.html#audio-effects-lpf
d.fx.add(d) should be d.fx.add(l)
e.g.
k = Kick()
k.trigger.tidal("[1 0 0 [0 0.5]]/2")
Should slow the overall pattern down by 2, but instead seems to change the pattern duration correctly but doesn't shift the events to match.
a = Cube().position.x.seq([10,20,50] , 1/8)
Cube is created.
Uncaught TypeError: obj.seq.add is not a function
at Function.fnc.seq (:36359:15)
at :2:23
at Object.InjectedScript._evaluateOn (:905:140)
at Object.InjectedScript._evaluateAndWrap (:838:34)
at Object.InjectedScript.evaluate (:694:21)
I've been enjoying the playground for a couple of days so now I want to install Gibber 2 and play with it locally. I've hit a block while trying to install:
➜ npm i
> [email protected] install /Users/rich/projects/richdecibels.com/gibber
> npx gulp
[gulp] Using file /Users/rich/projects/richdecibels.com/gibber/gulpfile.js
[gulp] Working directory changed to /Users/rich/projects/richdecibels.com/gibber
Task default requires a function that is a function
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `npx gulp`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/rich/.npm/_logs/2020-08-29T20_25_05_769Z-debug.log
2020-08-29T20_25_05_769Z-debug.log
This is using gulp version 3 and node version 14.9. So I tried switching to gulp v4 and got a different error.
➜ npm i
> [email protected] install /Users/rich/projects/richdecibels.com/gibber
> npx gulp
AssertionError [ERR_ASSERTION]: Task function must be specified
at Gulp.set [as _setTask] (/Users/rich/projects/richdecibels.com/gibber/node_modules/undertaker/lib/set-task.js:10:3)
at Gulp.task (/Users/rich/projects/richdecibels.com/gibber/node_modules/undertaker/lib/task.js:13:8)
at Object.<anonymous> (/Users/rich/projects/richdecibels.com/gibber/gulpfile.js:46:6)
at Module._compile (internal/modules/cjs/loader.js:1075:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1096:10)
at Module.load (internal/modules/cjs/loader.js:940:32)
at Function.Module._load (internal/modules/cjs/loader.js:781:14)
at Module.require (internal/modules/cjs/loader.js:964:19)
at require (internal/modules/cjs/helpers.js:88:18)
at requireOrImport (/Users/rich/projects/richdecibels.com/gibber/node_modules/gulp/node_modules/gulp-cli/lib/shared/require-or-import.js:19:11) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: false,
expected: true,
operator: '=='
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `npx gulp`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/rich/.npm/_logs/2020-08-29T20_29_01_518Z-debug.log
2020-08-29T20_29_01_518Z-debug.log
Any guidance would be much appreciated!
Particularly on end-user code eval, if there's an error, the gabber participant who triggered the code should be identified, so that they know they're the person who needs to fix the error.
On a related note... it might be nice to (optionally) suppress errors from other participants, so that your console is only filled with your personal errors.
I installed the Chrome update and it's now an error on http://gibber.mat.ucsb.edu/:
VM162:1 Uncaught SyntaxError: Identifier 'initSound' has already been declared
I don't know if this is a problem in Chrome. It seams like Chrome is also not playing many sounds so nicely like Firefox. I hope Chrome fixes the performance problems.
Regards, Alex
It might be nice to show an attribution for each Freesound sample the first time it is used in a session (in the console). Not sure if fair use requires this, but it would be a nice thing to do either way.
synth.attack = Clock.ms(2) doesn't seem to work currently on the v2 version.
Right now there is no way to clear a gabber room; gibber.clear() or ctrl-. do not remove existing code. Upon reentering a room, all existing code is executed.
It would be great if Gibber.clear() or Gabber.clear() refreshed the code on the server.
This is especially problematic if code which causes an error has been executed, as that code will persist and be reexecuted on entering the room.
The package.json file in the v2 branch looks weird:
{
"name": "gibber.audio.lib",
"version": "0.7.7",
"description": "standalone audio library from Gibber to use in node or in HTML documents",
"repository": {
"type": "git",
"url": "git://github.com/charlieroberts/gibber.audio.lib"
},
Is this expected ? And if so what is the relationship with the separate gibber.audio.lib repo ?
Would you have some quick installation instructions for building and running locally assuming they differ from v1 ?
Many thanks !
Valid tidal syntax like this should work for repeated notes drums.tidal( '[kd*2, ch*<12 8>, ~ sd]' )
instead of having to do this
drums.tidal( '[kd*2, <ch*12 ch*8>, ~ sd]' )
When trying to run the p5 instance mode example on http://charlie-roberts.com/gibber/examples/p5.gibber.simple.instance.example/ p5.gibber.min.js throws the following error: Uncaught ReferenceError: $ is not defined
I noticed some issues in gibber2:
Calling 'Graphics.init('3d')' displays a warning that my browser doesn't support webGL, and then the visuals crash. I noticed this issue when doing the tutorial on audiovisual mapping: using 'G.Graphics.init( '3d', col )', with or without the column cause this problem to occur. I'm using the latest version chrome on mavericks, and the graphics work fine before init('3d') is called.
film shader doesn't work on my browser - it just blacks out the visuals. The equivalent function on gibber1 works fine for me, and the other shaders seem to work alright. Dots/kaleidoscope shaders are some of the coolest effects I've ever played with :)
when calling functions that map onto graphics, like
// map the amplitude of the snare to the
// y rotation
a.rotation.y = b.snare.Amp
I have to call the function twice for the events to bind.
I haven't gone into the code-base yet, so I don't have productive advice :(
Thank you for developing this incredible piece of software!
A see from the tracking that this was fixed on gibber.cc, but this issue still exists in the version of gibber.lib.js available from github. I'm yet to understand how to download the library from gibber.cc - would it be possible to push the fix to the github as well?
Hi Charlie,
I can not figure out how to get a dat.gui control panel to work with Gibber. I have attached a simple page that illustrates my problem. Can you take a look?
thanks,
Joe
breaker.html.zip
In gabber (not tested in regular gibber), executing
s.note.seq( [0,1,2,3] ) //with no rhythm array defined
causes the tab to be unresponsive. Code can still be entered in the codebox but executing has no effect
Hi Charlie,
Seems like there hasn’t been much movement on the repo for a while but you’ve done some cool live performances a few months ago, does the repo have the latest code you were using ?
The forum seems to be a spectacular failure. I'm sure at least part of this is due to the need to create a separate account from the normal Gibber account.
Moving to a mailing list format (a la the SuperCollider and livecode lists) seems like a good idea. Thoughts appreciated.
As I understand it, alt-enter
is supposed to execute whatever block the cursor is in, a block being defined as code surrounded by blank lines. The code editor on gibber.cc will auto-indent new lines using spaces -- which is good! -- but it seems that Gibber treats lines with space characters as non-blank. So a given block of code may appear bounded by empty lines, but pressing alt-enter
will end up selecting more code than intended.
IMHO, the code that determines the boundaries of a block should treat whitespace-only lines as being blank. Thoughts?
I wanted to use gibber for live coding video for external tracks.
If I wanted to add external audio for gibber processing (levels, fft?) where do I start?
I cannot evaluate this kind of expressions.
[1,2,3].find(x => x > 1);
if i wrap them inside an "evil" eval, it works...
eval("[1,2,3].find(x => x > 1);")
Hey there!
We're trying to create a chat room in gibber.cc with javaScript in chrome.
When I write the name of the room and press enter nothing happens so we can co-live-code :(
any idea why is this happening?
thanx in advance!
Add MIDI support for Chrome that takes advantage, when possible, of Gibber's continuous mapping abstractions. MIDI support seems fairly simple... as a test see:
The public URL is down, i cannot access Gibber anymore :(
I'm not sure if this is a bug or a "feature" but for certain combinations of instruments and loudness and/or gain settings, there are playback issues, with playback jitter, slowdown and clipping.
I'm running Firefox 83.0. Here is a minimal example that causes jitter on my system:
Clock.bpm=180;
Theory.mode = "chromatic";
Theory.root = "a4";
m1 = Monosynth("bass", {"decay":0.25,"loudness": 2});
m1.note.seq( [ 16, 16, 12, 14, 14, 14, 24, 14, 14, 14, 14, 14, 14 ], [ 0.5, 0.25, 0.25, 0.5, 0.25, 0.25, 0.5, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25] );
The specific note is the 24
in the sequence that causes the jitter. Putting more notes of equal or greater value causes more jitter. Also, decreasing the loudness
parameter to 1
causes the jitter to go away.
Note that the 24
note in the sequence is upwards of a7
or so, which I assume is on the high end of the note range.
Other instruments with certain note and loudness settings causes similar slowdown/jitter issues. I've encountered it enough, especially with the Monosynth's, that I have to be cautious about what note, loudness and instrument combinations I use.
I've encountered similar jitter/slowdown issues with shoving weird parameters in synthesizers in a wide range of applications so I suspect this is the nature of doing complex synthesizer manipulation in software. I hesitate to open an issue as it might either be something that takes too much work to fix or caused by the underlying audio API but I thought I'd pass along anyway.
Whenever the whole text fits on the page and there is no need to scroll and you accidentally scroll, the text disappears.
Hi.
Don't know if this is really a bug, but , can't run Gibber environment in master
branch using localhost (using node.js' http-server), external/script.min.js
missing.
It does run at the gibber2
branch.
Thanks
Neither does executing Clock.stop
Dont know how to stop gibber, although it sounds great =)
It seems that beginning to sequence one or more instruments results in delays and glitches, sometimes it takes several seconds if starting several instruments (3-4) and sometimes the playback speed glitches and accelerates / decelerates until it stabilises.
I've tried on several machines including some very high spec ones and while the more powerful ones have less issues they can still experience these multi second pauses.
There are a few functions that I have come across that don't seem to be documented. Not sure if these should be listed as separate issues, but I've grouped them together here. Let me know if you want them separated.
Line is mentioned in some parts of the docs but does not have its own entry in the docs, and as far as I can see there are quite a few envelopes that are available but not documented by themselves. Also there are functions associated with envelopes e.g. retrigger() that can be very useful. Maybe a whole section on envelopes would be useful.
In the Audio basics part II tutorial binops Add, Mul are used and Div is mentioned, but not used. These do not appear in the docs and there are other binops which don't seem to be mentioned anywhere i.e. Sub, Mod, Abs, Sqrt, Pow, Clamp, Map. Merge is in another tutorial but not documented. Maybe a whole section on BinOps would be good.
Lastly there is documentation of the various synths and their methods, but not the presets. Some, but not all of the presets are listed in the manual and it would be good to have the presets included, or at least linked, from the relevant Synth docs.
I'd like to get demo functionality going similar to the wavepot project:
So that users can simply click through a list of demos and immediately see / hear / interact with the results. I imagine a column with demos appearing when gibber first loads. Clicking any demo in the list would clear Gibber's graph and immediately start the new demo. There would be a button that would launch the demo column if it is closed, and possibly a cookie that would avoid launching the demo column on launch according to user preference.
Any thoughts on this would be appreciated.
At one point, I believe there were separate filter categories for pre
and post
in addition to user-defined / added filters. If this was restored / implemented, we could make it easy for users to remove problematic filters that they've added without having to worry about them removing other critical filters (like note->frequency conversion, or beat->samples, or filters for annotations) that gibber adds automatically.
My apologies if this is not the appropriate forum for this type of error or if the 'alpha' gibber portion is considered in active development and bug reporting is not desired.
While playing in the 'alpha' playground, I was trying to get "chords" to work. When trying to run the following code:
Theory.mode="chromatic"
s = PolySynth("bleep", {"decay":1, "maxVoices":4})
s.chord([0,4,7])
I see in the "debug console" a message of the form:
TypeError: frequencies.forEach is not a functiongibberish_worklet.js:8559:19
chord https://gibber.cc/alpha/playground/gibberish_worklet.js:8559
callback https://gibber.cc/alpha/playground/gibberish_worklet.js:10149
anonymous https://gibber.cc/alpha/playground/gibberish_worklet.js line 7450 > Function:6
process https://gibber.cc/alpha/playground/gibberish_worklet.js:17776
Here is the snippet of in question (in gibberish_worklet.js):
...
chord(frequencies) {
// will be sent to processor node via proxy method...
if (Gibberish !== undefined && Gibberish.mode !== 'worklet') {
frequencies.forEach(v => this.note(v));
this.triggerChord = frequencies;
}
},
...
Once the error occurs when trying to use the chord
method, the window no longer plays sounds and the little moving light bar in the upper left stops running.
I also tried using an example I saw from an online book, "Gibber User Manual", Part 2, that gave the following example:
a = FM({ maxVoices:4 })
a.chord( [0,2,4,6] )
For which I get the following error:
TypeError: a.chord is not a function
anonymous https://gibber.cc/alpha/playground/bundle.js line 61491 > Function:6
runCode https://gibber.cc/alpha/playground/bundle.js:61496
Enter https://gibber.cc/alpha/playground/bundle.js:61537
doHandleBinding https://gibber.cc/alpha/playground/bundle.js:30189
handleKeyBinding https://gibber.cc/alpha/playground/bundle.js:30260
lookupKey https://gibber.cc/alpha/playground/bundle.js:29834
lookupKeyForEditor https://gibber.cc/alpha/playground/bundle.js:30203
dispatchKeyInner https://gibber.cc/alpha/playground/bundle.js:30230
dispatchKey https://gibber.cc/alpha/playground/bundle.js:30226
handleKeyBinding https://gibber.cc/alpha/playground/bundle.js:30260
onKeyDown https://gibber.cc/alpha/playground/bundle.js:30279
operation https://gibber.cc/alpha/playground/bundle.js:27001
on https://gibber.cc/alpha/playground/bundle.js:23614
registerEventHandlers https://gibber.cc/alpha/playground/bundle.js:31085
CodeMirror https://gibber.cc/alpha/playground/bundle.js:30950
CodeMirror https://gibber.cc/alpha/playground/bundle.js:30909
onload https://gibber.cc/alpha/playground/bundle.js:61098
EventHandlerNonNull*[253]< https://gibber.cc/alpha/playground/bundle.js:61084
o https://gibber.cc/alpha/playground/bundle.js:1
r https://gibber.cc/alpha/playground/bundle.js:1
<anonymous> https://gibber.cc/alpha/playground/bundle.js:1
Though this error does not cause the gibber sound to "crash" and I can still play sounds after this error has occurred.
I'm running Firefox 83.0 (64-bit) on Ubuntu 16.04.7 LTS (Xenial).
Due to lack of semantic html, login form faces certain problems like:
Login can be improved without affecting performance by writing semantic html that will enable placeholder attributes and form respond to enter button of keyboard.
Is there any way I can basically type in sheet music? Like I just want to specify which notes to play and for how long.
I'm essentially trying to transcribe fireflies by owl city using gibber. This is mostly a learning experience for me, and I'm wondering the best way to do that.
This is what I've got so far:
b.play(['a#2','d5','c#6','d#5','b5','f5','d#3'],
[ 1/8 ,1/16, 1/8, 1/16, 1/8, 1/16,1/2])
But as you can see by the sheet music, there are sometimes notes playing at the same time, and this does not allow me to do this. Also, at some point, when I have more notes, I think it might be difficult not having the notes right above the length of the note. So, is there any way where I can specify the length of the note (1/2,1/8,1/4) right after I specify the note?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.