wavetable | N163/FDS wavetable toolkit

 by   nyanpasu64 Python Version: wave-reader-v2 License: No License

kandi X-RAY | wavetable Summary

kandi X-RAY | wavetable Summary

wavetable is a Python library. wavetable has no bugs, it has no vulnerabilities, it has build file available and it has low support. You can download it from GitHub.

N163/FDS wavetable toolkit
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              wavetable has a low active ecosystem.
              It has 5 star(s) with 0 fork(s). There are 1 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 13 open issues and 6 have been closed. On average issues are closed in 22 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of wavetable is wave-reader-v2

            kandi-Quality Quality

              wavetable has no bugs reported.

            kandi-Security Security

              wavetable has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              wavetable does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              wavetable releases are available to install and integrate.
              Build file is available. You can build the component from source.
              Installation instructions, examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi has reviewed wavetable and discovered the below as its top functions. This is intended to give you an instant insight into wavetable implemented functionality, and help decide if they suit your requirements.
            • Process configuration file
            • Convert frequency to midi
            • Construct command line arguments
            • Write to brr_encoder
            • Align a list of overlapping waves
            • Return correlation between fixed and sweep
            • Compute the correlation between two arrays
            • Play a list of notes
            • Convert midi to a frequency
            • Render a note
            • Parse pitch
            • Safely evaluate an expression
            • Safely evaluate a node
            • Calls circular convolve
            • Convolve the input array with a given filter
            • Re - phases a waveform wave function
            • Creates a new array from a string
            • Calculate the wavelength of the input spectrum
            • Calculate the Fourier transform of the input spectrum
            • Convolve a given array using circular convolve
            • Calculates the power of a list of phasors
            • Calculate the l of the logarithm function
            • Return an unrounded wavereader configuration
            • Calculate circular diff
            • Calculate the spectrum at a given index
            • Returns a shallow copy of an instr
            • Load waves from file
            Get all kandi verified functions for this library.

            wavetable Key Features

            No Key Features are available at this moment for wavetable.

            wavetable Examples and Code Snippets

            Wavetable API (N163, SNES BRR),N163 Ripper,config.yaml syntax
            Pythondot img1Lines of Code : 16dot img1no licencesLicense : No License
            copy iconCopy
            wav_path: "filename.wav"    # quotes are optional
            nsamp: N163 wave length
            pitch_estimate: 83          # MIDI pitch, middle C4 is 60, C5 is 72.
                                            # This tool may estimate the wrong octave, if line is missing.
                          
            Wavetable API (N163, SNES BRR),N163 Ripper,Output Format
            Pythondot img2Lines of Code : 12dot img2no licencesLicense : No License
            copy iconCopy
            Ripped Waves (copy to clipboard, click Paste button in j0CC-Famitracker instrument editor):
            0 0 0 2 4 7 9 10 11 12 14 15 15 14 12 12 13 13 12 8 5 4 5 6 7 7 7 7 5 4 2 1; ...
            1 0 0 1 3 6 9 11 13 13 14 15 15 15 14 14 15 14 12 9 6 5 6 6 6 5 4 5 5 5 4 3
            
              
            copy iconCopy
            file: "filename.wav"
            nsamp: 64
            range: 64
            vol_range: 33
            pitch_estimate: 83              # MIDI pitch, middle C4 is 60, C5 is 72.
            at: 10                          # Pick time (in units of 1/60th second)
            [optional] fft_mode: normal     # "zoh" adds a sli  

            Community Discussions

            QUESTION

            How to read optimally from an array (in memory) having array position from a vector?
            Asked 2021-Apr-13 at 20:45

            I've such a code:

            ...

            ANSWER

            Answered 2021-Apr-13 at 20:45

            Your code is not too efficient for multiple reasons.

            1. You’re setting individual lanes of SIMD vectors with scalar code. Processors can’t quite do that, but the compiler pretends they can. Unfortunately, these compiler-implemented workarounds are slow, typically they do that with a rountrip to memory and back.

            2. Generally, you should avoid writing loops of very small lengths of 2 or 4. Sometimes compiler unrolls and you’re OK, but other time they don’t and the CPU is mispredicting way too many branches.

            3. Finally, processors can load 64-bit values with a single instruction. You’re loading consecutive pairs from the table, can use 64-bit loads instead of two 32-bit ones.

            Here’s a fixed version (untested). This assumes you’re building for PCs i.e. using SSE SIMD.

            Source https://stackoverflow.com/questions/67076900

            QUESTION

            Is there a way to set an object member array size from a project's main program file that #includes the .h file used to declare/define the object?
            Asked 2020-Dec-18 at 01:26

            For context, I'm working in c++ on a stm32f ucontroller doing embedded audio and trying to avoid dynamic allocation.

            One of the classes I've written is a wavetable oscillator that is, for the scope of my question, essentially just a bunch of c-style arrays.
            I have these files, among others, in a separate folder from the specific project that is using them so I can reuse them across projects with no rewriting or copy/pasting.

            The values that fill the arrays are calculated during an initialization routine rather than being hardcoded so that, if I change the "#define tableLength 256" statement at the top that sets the size of the arrays from 256 to some other value, the waveforms will be recalculated properly the next time I compile and flash the program onto the chip.

            Since I'm working with limited memory resources, some programs that use this wavetable oscillator may necessitate that these tables be of a smaller size.

            Is there a way of specifying the size of these arrays from a given project's main program file so that nothing needs to be changed in the shared wavetable oscillator file?

            I'm still pretty early into my programming journey, but my intuition tells me there must be some sort of mechanism to accomplish this since the size of the arrays will still be known at compile time?

            I'm trying to avoid changing the array size directly in the shared file, because any file that gets modified since the last flashing gets recompiled during the flashing process.
            This means I would have to remember to change the value every time I needed to flash a different product or work on a different project.

            For further context, I'm building and uploading the programs using a makefile.
            My knowledge of using them is very minimal, so maybe there's a way to specify the size to be used for the arrays from the project's makefile?

            Thanks for the help.

            ...

            ANSWER

            Answered 2020-Dec-18 at 01:26

            Since you include the c++ tag in your question and c++ language includes templates, then you can parametrize the size of a static array declared in another file from a MAIN.cpp file like this:

            In MYCLASS.cpp (declared in MYCLASS.h)

            Source https://stackoverflow.com/questions/65333678

            QUESTION

            Pygame read MIDI input
            Asked 2020-Nov-20 at 16:04

            I referenced the Pygame MIDI documentation and this code to try to get MIDI input to work. The MIDI Interface (Avid Eleven Rack) receives MIDI data from my MIDI controller just fine in my audio software (Pro Tools). Using Pygame, however, I can not seem to read any information at all.

            Source Code ...

            ANSWER

            Answered 2020-Nov-20 at 16:04

            I got an answer in another forum. It turns out that there is an example file which shows how to get the code to work. So if someone else stumbles over this problem here is the useful part of example code:

            Source https://stackoverflow.com/questions/64818410

            QUESTION

            Change wavetable pitch (Resample)
            Asked 2020-Oct-19 at 19:07

            I've been using math equations to do some basic synthesis for android. The problem with that the formulas keep and keep getting more complicated. So i'm starting to use wavetable synthesis.

            So far i can play a single note based on an array of bytes and a predetermined frequency. However when looking for formulas to resample the samples and change the pitch of the wavetable... i just couldn't find a simple solution. There are whole libraries that do this. But it feels like it should be a simple formula to change the sample frequency by downsampling or oversampling.

            Is there an easy way of doing that?

            Ex: Input is [0,0.5,1,0.5,0...] let's pretend it's a C4

            To make it a C3 the expected output should be [0,0.25,0.5,0.75,1,0.75,0.5,0.25,0...]

            Basically it's and android's audiopool "rate" property but just the formula that resamples the bytes, which i haven't found anywhere

            EDIT:

            Thank you to Phil Freihofner for guiding me to the answer. However the original formula he provided didn't smoothed out the end in case of oversampling. But it was a really nice start and i only had to smooth the end. I will attach my end code in case anyone wants a simple function to "Stretch out" a float array.

            ...

            ANSWER

            Answered 2020-Oct-19 at 19:07

            Let's say you have a wave table in floats.

            What you can then do is create a "cursor" to iterate through the table. This cursor does NOT have to be an integer, it can be a float. When your cursor lands on a value that is in between two elements your wave table, you can use linear interpolation to calculate a "good enough" value to return.

            Consider the first wave table the have. It plays C4 when you use a cursor with an increment of 1. If you make the increment 0.5 and use linear interpolation, the values that you would be returning would be the same as contents of your table that is an octave lower.

            But you could chose any increment value, and even change it over time (to get glissandos).

            The exact size of the increment for the cursor will depend on the size of the wave table and the sample rate as well as the desired pitch.

            I am using wavetables for an FM synthesizer I coded. The sine wave table has 1024 increments for a single wave, float resolution. It seems to be working well. Sounds are quite clear--definitely less quantization noise than I get with my old Yamaha DX7 or the second generation DX7S.

            Here is the code I'm currently using for returning the wave table value for a given cursor value, using linear interpolation:

            Source https://stackoverflow.com/questions/64417603

            QUESTION

            Dynamically setPeriodicWave() of WebAudio Oscillator that's playing?
            Asked 2020-Jul-10 at 15:01

            Trying to do some basic wavetable synthesis (developing an addon for p5.sound) – and wondering if it's possible to dynamically change the waveform of an oscillator while it's playing (constant tone rather than note duration)? In my basic testing, the setPeriodicWave() function has to be called before the oscillator is connected to the AudioContext output then started. Hoping to do some dynamic wavetable synth (with two hard panned channels) for feeding into the X-Y mode of an oscilloscope (for vector visuals based on audio signals). The workflow above, constantly creating a new oscillator with every wavetable change, causes lots of artifacts and phase-shifting issues... it would be great if I could start two oscillators and just update their waveform. Any tips on workflow for doing so? My abstracted workflow:

            • create oscillator with 'custom' type (inited with a flat/silent wave)
            • custom setWavetable() which uses functions from dsp.js to createPeriodicWave() with array values
            • re-init oscillator with this wave (stop oscil, disconnect/trash oscil, init new oscil w/ wave, connect + start oscil)
            ...

            ANSWER

            Answered 2020-Jul-10 at 15:01

            What issues are you having? As an example, this works for me. I can clearly hear the sound change:

            Source https://stackoverflow.com/questions/62833963

            QUESTION

            Why does my template lead to duplicated symbols?
            Asked 2020-May-10 at 07:40

            My program has 30 duplicate symbols errors for the methods length() and table() from the struct below.

            This struct can be instantiated in four ways. Each of them is identical but for the table each instantiation refers to and, potentially, the length of that table.

            This needs to be known at compile time in order that I can construct an array in the following fashion.

            std::array, N> oscillators;.

            Could someone please help me to see my error?

            ...

            ANSWER

            Answered 2020-May-10 at 07:35

            Fully specialized template functions in a header file should be declared inline

            Source https://stackoverflow.com/questions/61708606

            QUESTION

            Multi-Threaded Wavetable Synthesizer clicks. Is this caused by torn reads?
            Asked 2020-Mar-18 at 18:23

            I'm currently working on a very basic wavetable synthesizer. I'll try my best to give an understandable overview.

            I have a single lookup-waveform with 4096 points, which is sampled by the audio thread. In general, however, a single oscillator has multiple waveforms, which can be morphed by a position parameter. For example, let's take two sine waves where the second one has half the period of the first one. When we play those back at frequency = 440Hz and position = 0.5, we would hear two equally loud tones at 440Hz and 880Hz. Here's a link to the audio (See Sidenote 2).

            Due to performance reasons I generate the lookup table on another thread whenever the position parameter changes. And therein lies my problem. Even when I don't change the table position and just periodically generate my lookup table, I get weird, unpredictable glitches. Since the audio data in the table doesn't change in this case, I can only explain this by torn reads. Is that correct? And if so, how do I get around it? Do I use a double-buffer with an atomic pointer-swap after I finish generating the data?

            Again, here's the audio for this recording (See Sidenote 2). Also, some oscilloscope data:

            Sidenote 1: Populating my lookup table takes ~50,000ns without optimizations and ~10,000ns with optimizations. But the glitches seem to happen with the same probability.

            Sidenote 2: The website I uploaded the audio to seems to have introduced some weird harmonics, which are not audible in my video. Just so you know.

            ...

            ANSWER

            Answered 2020-Mar-18 at 18:23

            Found it! I accidentally set an old scanner position after generating my lookup table. If the latter took too long my position was basically reset to a few microseconds earlier, which explains the visual setback in the oscilloscope.

            Source https://stackoverflow.com/questions/60743123

            QUESTION

            Lua send command line to Windows (& Mac)
            Asked 2019-Dec-16 at 08:32

            I'm using sendmidi to send midi to the Windows Midi Device or in Mac to the Mac Midi Device. In Win I can send from the command prompt and same in the terminal: sendmidi.exe dev "Microsoft GS Wavetable Synth" pc 17 channel 1 on 60 90

            Can I send command lines with Lua without executing a .bat or .vbs ?

            I can get the script path where I have the Win & Mac executables sendmidi.exe & sendmidi with

            ...

            ANSWER

            Answered 2019-Dec-16 at 07:17

            QUESTION

            Send MIDI to Microsoft GS Wavetable Synth using sendmidi
            Asked 2019-Dec-15 at 15:07

            I'm trying to send a midi note to Microsoft GS Wavetable Synth using sendmidi

            ...

            ANSWER

            Answered 2019-Dec-15 at 15:07

            To ensure that the device name is interpreted as a single parameter, you have to quote it:

            Source https://stackoverflow.com/questions/59340389

            QUESTION

            Wavetable Synthesis - WebAudioApi
            Asked 2018-Nov-29 at 20:12

            I am trying to create a wavetable synthesizer using the Web Audio Api. What i would like to achieve is the possibility to linearly swap from a wave form to another one (like Massive or Serum).

            For example: starting from a sine wave, i rotate a knob that will gradually transform it into a square wave.

            I've searched on the documentation and so far i found how to create a custom waveform:

            ...

            ANSWER

            Answered 2018-Nov-29 at 20:12

            IIUC, I don't think using a set of gain nodes will produce what you want. And there's no builtin node to do this.

            I think you will have to do this yourself with an AudioWorkletNode.

            Source https://stackoverflow.com/questions/53537747

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install wavetable

            Install Python 3.6 (earlier versions are unsupported), and run the following commands:. (I used to recommend Miniconda3 conda install numpy scipy, but pip now works on Windows, without a compiler and inordinate build times.).

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/nyanpasu64/wavetable.git

          • CLI

            gh repo clone nyanpasu64/wavetable

          • sshUrl

            git@github.com:nyanpasu64/wavetable.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link