Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Ed McManus
    @emcmanus
    Hi! Creator of TinyRave here. Happy to answer any questions, help with track performance issues, etc.
    Raphaël Bastide
    @raphaelbastide
    Hi Ed, thank you for your project, it is great!
    As I am an active user of http://studio.substack.net/ for live compositions, I wonder if TinyRave / TinyRave Atom module could have a live option, to execute the code as it is edited.
    Ed McManus
    @emcmanus
    Hey @raphaelbastide - thanks! This is a tough one to do well. But I think you can get close with the keyboard shortcut to preview. When editing code, you can hit “cmd+enter” (or “ctrl+enter” on windows), and it’ll update the audio.
    And the Atom package uses the same key bindings, which I think is a little more polished than the TinyRave.com text field: https://atom.io/packages/tinyrave
    Ed McManus
    @emcmanus
    (I say tough to do well because in my experience live editing becomes a hindrance for longer compositions)
    Raphaël Bastide
    @raphaelbastide
    Shortcuts are great for editing but not for live coding or performing, or in my case to search for new waves quickly. But I understand that it is not just a small feature :)
    And live edition is one of the great feature of javascript-assisted sound composing
    xem
    @xem
    Hello, what's the license of the musics present on TinyRave ? Can we use them in (free) demos? commercial projects? Thanks
    Anastasia Dunbar
    @AnastasiaDunbar
    How do you import samples easily? Like a .wav file from a website to be imported into your script. Just like in Wavepot, but Wavepot only supports files that are on Github.
    It would be easier instead of converting a wave file into an array.
    Ed McManus
    @emcmanus
    Ah right now if you want to import samples youll need to roll your own solution. (Like you did in one of your tracks.)
    also just a note im travelling in an area with very little internet access right now, so will be slow to reply
    Anastasia Dunbar
    @AnastasiaDunbar
    How do you get inputs such as mouse and keyboard?
    RavenWorks
    @omgitsraven
    Hello! I'm trying out TinyRave, but it seems like the value passed to buildSample ascends a little too quickly to be seconds?
    also, the 'BuildTrack demo' just says "err is not defined" and doesn't play.
    Anastasia Dunbar
    @AnastasiaDunbar
    What happened to TinyRave.com?
    Ed McManus
    @emcmanus
    Whoops sorry I let the domain lapse – it's back up now!
    @AnastasiaDunbar ^
    Anastasia Dunbar
    @AnastasiaDunbar
    Uploaded mine here just to make sure that they won't go away.
    Greggman
    @greggman
    Safari only? Both Chrome and Firefox fail with errors for me
    Anastasia Dunbar
    @AnastasiaDunbar
    Chrome works completely fine for me but Firefox doesn't have importScripts so I cannot use TinyRave functions I've made here. Is there a workaround?
    Anastasia Dunbar
    @AnastasiaDunbar

    (repost where I solved the pitch problem)
    Does your code look like this? (the output audio pitch goes higher when you decrease the sampleRate and vice versa):

    sampleRate=44100;
    //inside the audio processor (input is buffer data)
    time+=input.length/sampleRate;

    Did you know that you can't change the audioContext's sampleRate? The default is 48000Hz (but not for all browsers probably) so you should do this instead:

    time+=input.length/audioContext.sampleRate;

    Make sure you do time+(sample/audioContext.sampleRate) for the DSP output data.

    As @omgitsraven said that "it seems like the value passed to buildSample ascends a little too quickly to be seconds?".
    A workaround for the people using TinyRave do time*=44100/48000;.
    Anastasia Dunbar
    @AnastasiaDunbar
    Now I have tinnitus.
    I'm glad I learned using audio processing in vanilla JavaScript.
    Ed McManus
    @emcmanus
    Hey @AnastasiaDunbar ! This looks like a workaround for downsampling a 48000Hz script to 44100? (44100 is what I use in the tinyrave AudioContext)
    And yeah mistakes when doing DSP in JS are painful. Hopefully it means you make fewer mistakes :-P
    John Ranck
    @johnranck

    Hi! I'm pretty new to this but i've been trying to use tinyrave in Atom. I've installed the package and can make a sine wave to sound but when adding certain types of example code I get this error:

    Uncaught TypeError: Cannot read property 'remove' of undefined
    /Users/bkwrm/.atom/packages/AtomPackage/node_modules/atom-message-panel/lib/MessagePanelView.js:189
    Show Stack Trace
    The error was thrown from the TinyRave package. You can help by creating an issue. Please explain what actions triggered this error.

    Once I get this error tinyrave doesn't work at all in Atom until I quit and restart again. This seems really cool so I'd love to be able to get some help. Thanks in advance for your time.

    Ed McManus
    @emcmanus
    Hey @johnranck ! I didn't think anyone was using that plugin :-P I just took a look and it appears a lot has changed in the ~2yrs since it was written, so it may not be a simple fix. I'll try to take another look this weekend, and will let you know if I modernize the plugin. In the mean time thanks for filing the issue, that was helpful! Without that plugin you may want to experiment using Atom, and copy/paste periodically into the editor on Tinyrave.com. Not ideal for quick experiments, so lemme see if I can get the plugin working. Thanks!
    mroberts1
    @mroberts1
    I'm having the exact same issue as John - can't get Atom to play any scripts, with the same error. It would be great if you could update the plugin package!
    Anastasia Dunbar
    @AnastasiaDunbar
    @emcmanus Can you fix this‽ Because if you do the 440 Hz test by return Math.sin(Math.PI*2*440*time); you'll notice that it's a bit higher than it's supposed to be.
    Because you wrote var SAMPLE_RATE = 44100; and AudioContext's default sampleRate value is 48000.
    You could just do var SAMPLE_RATE = audioCtx.sampleRate; or var time = tr_samplesGenerated / audioCtx.sampleRate;. Please fix it.
    sampleRate is read-only and cannot be changed.
    Anastasia Dunbar
    @AnastasiaDunbar
    (Sorry for assuming you used AudioContext instead of WebSockets.)
    alan2here
    @alan2here
    Hey
    Is anyone on right now?
    Anastasia Dunbar
    @AnastasiaDunbar
    I'm here.
    But I'm definitely more active on Discord.