Git Product home page Git Product logo

potatochips's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

potatochips's Issues

Pitch 2600

The Atari 2600 had only 2 voices, making it difficult to play chords. A solution that is popular is to use a fast appegio to produce a chord-like effect.

Since there are only two voices on the Atari, it's difficult to play chords. But you can use fast arpeggios to give the effect of playing chords on only one voice. You just step through each note of the chord quickly which gives the essence of the chord. Typically I do a note per step in my music driver. I have tried running arpeggios at a note per frame (60 per second) but it sounds bad when it gets that fast. You introduce 60Hz noise at that speed.

A module that provides this functionality (with some bonus stuff) would be useful for distorting and lightly mangling VOCT signals.

[106] Better Default Waveforms

Using a sine wave as the default wave in all the wavetables means the wavetable knob is useless when first placing the module. It seems better to default each waveform to a different basic shape: sine, ramp up, ramp down, pulse, triangle.

Amiga Paula Module

The Paula is the sound chip on the Amiga personal computer that produces audio from a 512KB bank of sample data. An existing project, WinUAE, emulates the Amiga PC in C++, and may have portions of DSP code that can be ported over into a VCV module, either as a sound generator (sample player), or complex audio effect (downsampling, quantization, and other eccentricities due to hardware or software bugs in the chip).

VCV Rack v2 transition

I'd like to encourage you to make the change.
I miss your modules in Rack V2 library.
Best regards, Andras

Konami SCC

A module that provides access to the Konami SCC emulator would be cool.

[2612] Frequency Knob

a knob for controlling the base frequency in addition to the VOCT input for each of the 6 voices could be useful

undefined symbol _ZN15WaveTableEditorIhE11ColorBorderE on armv7l

Describe the bug

i'm maintaining armv7l (32bit) and aarch64 (64bit) builds of vcvrack and the open source plugins at https://github.com/hexdump0815/vcvrack-dockerbuild-v1 - when i build the PotatoChips plugin it compiles fine on armv7l but when i start rack i get "undefined symbol _ZN15WaveTableEditorIaE11ColorBorderE" and the plugin will not load - the same build works fine on aarch64 and x86-64 ... i guess this is a armv7l specific problem and not really a problem of your plugin, but maybe you have an idea where it might come from ... could it be a 32 vs 64 bit issue maybe? any help would be welcome as i'm not that familiar with the c++ details

To Reproduce

build and run the latest version of your plugin on armv7l

Expected behavior

it works

Screenshots

not needed

Environment

  • ubuntu 18.04 on armv7l with gcc/g++ 8.4.0

Additional context

already given in the initial description

Support for Polyphony

Polyphony would be a good add, though #7 will need to be resolved first; the current code will not scale very nicely.

road map:

  • 2A03
  • VRC6
  • 106
  • GBS
  • AY-3-8910
  • POKEY
  • SN76489
  • FME7

Yamaha YM2151

It would be cool to add module that emulates OPM chip (which was in Yamaha CX5M/II MSX computer, Sharp X68000, Sega System 16 and some others). It is a 4-operator FM chip, similar to YM2612 (OPN2), but more 'primitive' in a way, more raw sounding. It can produce some very interesting vintage digital synth sounds (here is example video). There are some excellent open source libraries (NukedOPM, an implementation from MAME), which can be used to implement module. YM2151 parameters are mostly the same as in Boss Fight module, so not much to change :)

Sony S-SMP (SNES)

Several modules can be made from the S-SMP emulations for different uses:

  • S-SMP(Echo): echo effect + FIR filter
  • S-SMP(ADSR): ADSR Envelope generator
  • S-SMP(Gauss): Guassian filter + low-pass gate
  • S-SMP(Sampler/WTO): A 32KHz, BRR-based sampler engine & wavetable oscillator based on looped single-cycle BRR waveforms
  • S-SMP(BRR): distortion effect (downsampler / bitcrusher) based on BRR encoding / decoding (w/ filtering)
  • S-SMP the full S-SMP chip as a semi-modular synthesizer with BRR sample/WTO engine, envelope /w gain, gaussian filter, echo, FIR filter, etc., for more authentic emulation than the individual modules will provide

Links:

Oscillator Hard Sync

Some of the chips may support reseting the phase of an oscillator. Can this be used to introduce a sync function?

  • Mega Tone (previously SN76489)
    • feature not available
  • Boss Fight (previously 2612)
    • feature not available
  • Jairasullator (previously Ay-3-8910)
    • feature not available
  • Troglocillator (previously POKEY)
    • feature not available
  • Escillator (previously VRC6)
    • feature not available
  • Gleeokillator (previously FME7)
    • feature not available
  • Buzzy Beetle (previously 2A03)
  • Name Corp Octal Wave Generator (previously 106)
  • Pallet Town Waves System (previously GBS)
  • S-SMP(BRR)

High CPU Usage

can performance be improved? Code from Famitracker may be worth looking at. The DSP foundation is still the Blargg BlipBuffer code, but the chip emulations are different and have a more music friendly API. There are also emulations of the remaining NES chips in the Famitracker codebase.

[Expander] Mixer Output

all the oscillator modules in this plugin feature several output ports. A simple way to achieve a mix-out (for treating the chip like a single voice) is to implement a basic mixer as an expander module. This module would contain a single output port that sums the outputs from the neighboring chip module.

[POKEY] 16-bit mode

16-bit mode is implemented in the POKEY back-end, but isn't producing results that are useful or make sense. The hardware documentation of this feature is sparse to begin with, but my understanding is that it essentially enables a 16-bit frequency by sharing frequency registers between neighboring oscillators (1+2, 3+4). The panel logic to turn the feature on is in place, but currently disabled until the back-end issues are resolved.

Some oscillators generate impulse on startup

Describe the bug

When loading a patch with certain modules, an impulse is emitted on patch load

To Reproduce

Steps to reproduce the behavior:

  1. create a patch with
    • 2A03 with Pulse 1 output connected to plots, audio interface, etc.
    • a MIDI-CV gate connected to the volume input for Pulse 1
  2. save the patch then reload the patch
  3. observe an impulse generated by the oscillator voice

this occurs for most oscillators in a similar configuration as 2A03

Expected behavior

The oscillator is quiet on initialization if an empty cable is connected to the volume / amplifier level input.

Reset

All the chips feature a "reset" function.

  • should this be fired when a module is being reset, or is it sufficient to just reset all parameters?
  • is it useful to have button or CV control over this?

NEC TurboGrafx16

A module that provides access to the NEC TurboGrafx16 would be sweet.

[2612/2413] Single-operator module with audio input for arbitrary FM

Is your feature request related to a problem? Please describe.

I'd love to use Algomorph in conjunction with the operators of a 2612 (or 2413), but their individual FM (phase) inputs and audio outputs are inaccessible.

Describe the solution you'd like

It would be really neat to have a module something like the Bogaudio FM-OP, but containing an oscillator of one of these classic Yamaha FM chips. My thinking is that maybe the module could work by emulating two 2612/2413 operators, with the phase of one of them (the modulator) hijacked to be driven by external audio input rather than the chip's internal sine table. Ideally the other (carrier) operator would also have access to feedback. Like FM-OP, this theoretical module could also contain a built-in emulated 2612/2413 amplitude envelope.

I don't have any experience coding anything DSP or emulation related (besides noodling with the RAM in RackNES and the audio routing & cross-fading in Algomorph), so while I've taken a brief look into the 2612 code in this repository I'm not sure how feasible this module would actually be. What do you think?

YM2612 Triggers fail sometimes in SSG mode

Describe the bug

Sometimes the triggers to YM2612-based modules in SSG mode fail.

To Reproduce

Steps to reproduce the behavior:

  1. put MinIBoss into a polyphonic mode with a MIDI controller using 4+ channels
  2. place the envelope generator into SSG with a fast cycle
  3. turn on "prevent clicks" from the context menu (behavior happens in both modes)
  4. press buttons on a MIDI controller to trigger notes until a trigger failure occurs

Expected behavior

Retriggering in SSG mode should always behave like an LFO with hard reset. Sometimes this fails and a one-shot note leaks through using the envelope generator settings.

Additional context

Patch file

{
  "version": "1.dev.476a49b",
  "modules": [
    {
      "id": 1,
      "plugin": "Core",
      "version": "1.1.6",
      "model": "AudioInterface",
      "params": [],
      "leftModuleId": 154,
      "data": {
        "audio": {
          "driver": 1,
          "deviceName": "default",
          "offset": 0,
          "maxChannels": 8,
          "sampleRate": 44100,
          "blockSize": 512
        }
      },
      "pos": [
        57,
        0
      ]
    },
    {
      "id": 2,
      "plugin": "Fundamental",
      "version": "1.4.0",
      "model": "VCMixer",
      "params": [
        {
          "id": 0,
          "value": 1.0
        },
        {
          "id": 1,
          "value": 1.0
        },
        {
          "id": 2,
          "value": 1.0
        },
        {
          "id": 3,
          "value": 1.0
        },
        {
          "id": 4,
          "value": 1.0
        }
      ],
      "leftModuleId": 142,
      "rightModuleId": 150,
      "pos": [
        24,
        0
      ]
    },
    {
      "id": 5,
      "plugin": "Core",
      "version": "1.1.6",
      "model": "MIDIToCVInterface",
      "params": [],
      "rightModuleId": 142,
      "data": {
        "channels": 4,
        "polyMode": 0,
        "clockDivision": 24,
        "lastPitch": 8192,
        "lastMod": 0,
        "midi": {
          "driver": -11,
          "deviceName": "QWERTY keyboard (US)",
          "channel": -1
        }
      },
      "pos": [
        0,
        0
      ]
    },
    {
      "id": 142,
      "plugin": "KautenjaDSP-PotatoChips",
      "version": "1.10.1",
      "model": "MiniBoss",
      "params": [
        {
          "id": 0,
          "value": 15.0
        },
        {
          "id": 1,
          "value": 100.0
        },
        {
          "id": 2,
          "value": 31.0
        },
        {
          "id": 3,
          "value": 5.0
        },
        {
          "id": 4,
          "value": 7.0
        },
        {
          "id": 5,
          "value": 0.0
        },
        {
          "id": 6,
          "value": 1.0
        },
        {
          "id": 7,
          "value": 0.0
        },
        {
          "id": 8,
          "value": -1.18500173
        },
        {
          "id": 9,
          "value": 0.0
        },
        {
          "id": 10,
          "value": 0.0
        },
        {
          "id": 11,
          "value": 0.0
        },
        {
          "id": 12,
          "value": 0.0
        },
        {
          "id": 13,
          "value": 1.0
        },
        {
          "id": 14,
          "value": 3.0
        },
        {
          "id": 15,
          "value": 127.0
        }
      ],
      "leftModuleId": 5,
      "rightModuleId": 2,
      "data": {
        "prevent_clicks": true
      },
      "pos": [
        8,
        0
      ]
    },
    {
      "id": 150,
      "plugin": "Bogaudio",
      "version": "1.1.35",
      "model": "Bogaudio-VU",
      "params": [],
      "leftModuleId": 2,
      "rightModuleId": 154,
      "data": {},
      "pos": [
        34,
        0
      ]
    },
    {
      "id": 154,
      "plugin": "Bogaudio",
      "version": "1.1.35",
      "model": "Bogaudio-Analyzer",
      "params": [
        {
          "id": 0,
          "value": 0.0
        },
        {
          "id": 1,
          "value": 0.385500133
        },
        {
          "id": 2,
          "value": 1.0
        },
        {
          "id": 3,
          "value": 0.0
        },
        {
          "id": 4,
          "value": 1.0
        },
        {
          "id": 5,
          "value": 0.0
        }
      ],
      "leftModuleId": 150,
      "rightModuleId": 1,
      "data": {
        "frequency_plot": "log",
        "amplitude_plot": "decibels_140"
      },
      "pos": [
        37,
        0
      ]
    },
    {
      "id": 156,
      "plugin": "KautenjaDSP",
      "version": "1.0.0",
      "model": "Oscilloscope",
      "params": [
        {
          "id": 0,
          "value": 0.0
        },
        {
          "id": 1,
          "value": 0.0
        },
        {
          "id": 2,
          "value": 0.0
        },
        {
          "id": 3,
          "value": 0.0
        },
        {
          "id": 4,
          "value": 14.0
        },
        {
          "id": 5,
          "value": 0.0
        },
        {
          "id": 6,
          "value": 0.0
        },
        {
          "id": 7,
          "value": 0.0
        }
      ],
      "data": {
        "lissajous": 0,
        "external": 0
      },
      "pos": [
        0,
        1
      ]
    }
  ],
  "cables": [
    {
      "id": 1408,
      "outputModuleId": 2,
      "outputId": 1,
      "inputModuleId": 1,
      "inputId": 0,
      "color": "#0986ad"
    },
    {
      "id": 1317,
      "outputModuleId": 2,
      "outputId": 1,
      "inputModuleId": 150,
      "inputId": 0,
      "color": "#0986ad"
    },
    {
      "id": 1316,
      "outputModuleId": 150,
      "outputId": 0,
      "inputModuleId": 154,
      "inputId": 0,
      "color": "#0986ad"
    },
    {
      "id": 1428,
      "outputModuleId": 2,
      "outputId": 1,
      "inputModuleId": 1,
      "inputId": 1,
      "color": "#0986ad"
    },
    {
      "id": 1429,
      "outputModuleId": 5,
      "outputId": 1,
      "inputModuleId": 142,
      "inputId": 6,
      "color": "#c9b70e"
    },
    {
      "id": 1430,
      "outputModuleId": 5,
      "outputId": 6,
      "inputModuleId": 142,
      "inputId": 7,
      "color": "#c9b70e"
    },
    {
      "id": 1431,
      "outputModuleId": 5,
      "outputId": 0,
      "inputModuleId": 142,
      "inputId": 8,
      "color": "#c9b70e"
    },
    {
      "id": 1432,
      "outputModuleId": 142,
      "outputId": 0,
      "inputModuleId": 2,
      "inputId": 1,
      "color": "#0986ad"
    },
    {
      "id": 1434,
      "outputModuleId": 2,
      "outputId": 2,
      "inputModuleId": 154,
      "inputId": 1,
      "color": "#c91847"
    },
    {
      "id": 1320,
      "outputModuleId": 154,
      "outputId": 0,
      "inputModuleId": 156,
      "inputId": 0,
      "color": "#0986ad"
    },
    {
      "id": 1470,
      "outputModuleId": 142,
      "outputId": 0,
      "inputModuleId": 142,
      "inputId": 9,
      "color": "#0986ad"
    }
  ]
}

Polyphony

supporting polyphony would be nice.

Invalid tag in `plugin.json`

[KautenjaDSP-PotatoChips] Validating plugin.json...FAILED
[KautenjaDSP-PotatoChips] Issues found in `plugin.json`:

S_SMP: invalid module tags: Echo
-- Valid tags are defined in https://raw.githubusercontent.com/VCVRack/Rack/v1/src/tag.cpp

Normalled Inputs

Normalled inputs โ€“ e.g., for VOCT, Volume, etc. โ€“ can help reduce the number of patch cables needed

  • 106
  • 2A03
  • AY-3-8910
  • FME7
  • GBS
  • POKEY
  • SCC
  • SN76489
  • TurboGrafx16
  • VRC6

Control over low-pass equalization

all the oscillator modules in this plugin utilize a low-pass equalization algorithm. A simple way to achieve parameterization over this component is to implement a basic EQ as an expander module. This module would contain the parameters of the blip_eq_t object with CV inputs.

Duplicate Code

there is a lot of duplicate code that can be reduced to global functions.

  • getAudioOut
  • onSampleRateChange
  • constructors that initialize APUs and BLIPBuffers
  • frequency, period, and volume parameter converters
    • many of these can move to static functions within the chip emulator class
  • polyphony loops

Vectorized Engines for Improved Polyphonic Performance

Is your feature request related to a problem? Please describe.

Current serial processing of engines for polyphonic cases causes over-usage of computational resources.

Describe the solution you'd like

In some cases, replacing serial loops over polyphonic channels with vectorized code can improve the performance for polyphonic use cases.

Additional context

VCV specific solutions can be implemented using rack::simd. More generic implementations can be forged using a linear algebra and vectorization framework like Eigen.

Roadmap

APU code has been pulled from blargg's libraries for the chips below:

  • Ricoh 2A03 (Nintendo NES)
  • Konami VRC6 (Nintendo NES)
  • Sunsoft FME7 (Nintendo NES)
  • Namco 106 (Nintendo NES)
  • Nintendo GBS (Gameboy)
    • convert DPCM to wavetable voice
  • Sony S-SMP (Nintendo SNES)
    • echo effect
    • sampler module?
    • convert to wavetable voices?
  • Yamaha YM2413 (Sega Master Sysem)
  • Yamaha YM2612 (Sega Mega Drive)
  • Texas Instruments SN76489 (Sega Master System)
  • Konami SCC
  • General Instrument Ay-3-8910
  • Atari Pokey
  • NEC Turbo Grafx 16

[2612] Special Mode

There is a special mode where channel 3 allows individual frequencies for each operator that is not currently implemented on the panel. The logic does exist in the engine, but the class will need updated to allow addressing the extra frequency registers.

VCA Module

Many of these chips contain simple 4 or 5 bit amplifiers modeled directly from hardware. It may be cool to build an amplifiers module that integrates all the amplifiers models into a single amplifier for use with other oscillators.

Appropriate Error Handling

In many cases, debug assertions can be replace with exceptions in runtime code with no cost (assuming they never throw). In particular, errors can be thrown when:

  • attempting to set an output buffer for a nonexistent oscillator (i.e., index out of bounds error)
  • attempting to write data to a nonexistent register / RAM address (i.e., index of out bounds error)
  • time underflow (time should never underflow in bug-free code)

This isn't useful for VCV Rack, but is useful when using the dsp code as a library in other projects. It's also more readable and clear.

Yamaha YM2413

A module that provides access to the Yamaha YM2413 emulator would be awesome.

[GBS] LFSR input breaks noise generator

Describe the bug

spamming the LFSR trigger input causes the noise generator to 0 out and stop working after a point.

To Reproduce

Steps to reproduce the behavior:

  1. spam LFSR trigger input
  2. observe noise generator break at some point

Expected behavior

noise generator should always produce noise (up to the amplifier at least)

[106,GBS] Right Click to insert Basic Waveforms

An ability to right-click the waveform editor and insert basic waveforms would be nice:

  • ramp up/down (maybe with various slopes, log, exp, lin)
  • triangle (maybe with various heights)
  • pulse (maybe with various PWMs)
  • sine / cose

2612 CPU overload even when idle

Describe the bug

It starts at about 25% and quickly goes all the way up to 95-97%

To Reproduce

Steps to reproduce the behavior:

  1. foo
  2. bar

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots

Screen Shot 2020-10-14 at 10 34 51

Environment

Mac os 10.5.5 macbook pro 16"

Additional context

Add any other context about the problem here.

2612 initializes with noise sometimes

Describe the bug

Some of the oscillator voices on 2612 are initialized in a state that produces noise when there should be none.

To Reproduce

Steps to reproduce the behavior:

  1. initialize a 2612
  2. mess around with gates in polyphonic mode to try to find a noisy voice

Expected behavior

Voices do not produce undue noise (without being parameterized to be noisy), i.e., the default patch should always sound the same, but sometimes a voice has noise in it.

2612 sounds different at different sampling rates

Describe the bug

2612 sounds different at different sample rates.

To Reproduce

Steps to reproduce the behavior:

  1. set the engine sample rate to different values
  2. play the same note
  3. observe the output being at a different frequency for the different sample rates

Expected behavior

The notes should sound the same in terms of frequency between all sample rates.

[2612] Envelope Viewer

A way to visualize the envelope for each operator like is done by ChipsynthMD would be cool.

Oscillators Initialized perfectly out of phase

Describe the bug

Some oscillators are being initialized perfectly out of phase such they cancel each other out and produce silence.

To Reproduce

Steps to reproduce the behavior:

  1. non-deterministic. occurs on 2A03, VRC6, etc.

Expected behavior

All oscillators should initialize in phase and stay in phase (assuming they are tuned to the same frequency)

[2612] Performance is trash

Pretty self explanatory. The performance from 2612 at the moment is absolute garbage. Compared to the TercerBrazo module, it's clocking in at 25.0% (5.6us) vs 1.1% (0.23us). It's playable, but consumes a lot of valuable space that other modules will need. This needs to be addressed.

[POKEY] Frequency control in high-frequency mode

The frequency knob in high-frequency mode (Ch 1 and 3) has a large portion of range that does nothing. The frequency also reaches the inaudible range at some portions and becomes silent. This is intended functionality of the chip, but can be confusing to the end-user when a channel stops making noise for unknown reasons. The frequency should be capped such that it always makes noise. When the high-frequency mode is engaged, the calculation of frequency from the parameter knob will need to be updated to provide a more appropriate range of control.

[BossFight,MiniBoss] Add Nuked-OPN2 Yamaha YM3438 Emulation Engine

Right now, the 2612 emulation in the Boss Fight and Mini Boss modules miss out on some subtle sound quirks like the ladder effect in the original 2612. Nuked-OPN2 is a highly accurate emulation core that accurately models such quirks. I'm not sure if its possible to integrate it into this codebase, but if possible, that would be really cool.

[FME7] Noise

The FME7 has a noise generator like the AY-3-8910 that is not currently implemented in the module.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.