Giter VIP home page Giter VIP logo

muscle's People

Contributors

dunland avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

muscle's Issues

LCD display modes

  • 5V drive für LCD.. woher nehmen?
  • 5V DV input? → teensy und LCD mit füttern

Scores and Songs

Rename Score class to Songs, maybe, and make them non-static! this will simplify the addition of new songs.

experimental mode

  • general: reset all instruments to Monitor when leaving a score
  • set random values with each new entry of experimental mode 2

RandomSelect

ARPs müssen am Ende von RandomSelect Song gestoppt werden!

Effects: tapTempo with and without timeout

  • add new effects for tap tempo using timeOut and not using it.
  • using function overload: if none specified, take 0.
  • also make tihs addressable in the code, like instrument->set_effect(tapTempo, 5000);

song-specific scores as text files

Tabellarische Textdateien sollen score-steps aufbauen.

Score-assignment as follows:

  1. setup (read from txt)
  2. run

Beispielfunktionen:

song1.set_instr(instr, step, function); // (set step X of instrument Y to function Z)
song1.set_goal(variable, threshold); // when reaching threshold, proceed to next step
  • Wie MIDI-Werte zuordnen? → tabellarische txt file!

PCB remake

  • footprints für Widerstände sind etwas zu klein
  • Connectors zu groß? oder kabel direkt ran löten
  • MIDI-connectors nummerieren
  • fix MIDI input circuit (optokoppler 6n138 hat nur 8 pins.. in v1.0 sind leider 14 vorhanden)
  • besseres Layout mit Überlegungen, wie das Gehäuse aussehen soll und wo Platz für externe Bauelemente (Buchsen usw) ist

TODOs

  • use callback function for songs → set upon Song creation (replace Score::run) (or just define songs as dynamic objects?) #15
    • code hochladen und verifizieren!
  • Tsunami reparieren
  • create Hardware folder → Devices as .cpp files
  • rename score → song
  • move TOPOGRAPHY to TIMING/RHYTMICS class or so
  • merge teensy 4.1 to 3.2 and use IFDEF (device_type)
  • globally define LCD-print-type to refer to (enum Calibration, SongName, NanoKontrol, CCValues, ...)
  • warum funktioniert sattelstein->setTempoRange() nicht? (midi clock bleibt in 120)

Encoder gedrückt halten

... öffnet Menü:

  • enter Calibration
  • starte randomVoices
  • save Song (as...) (bei RandomVoices
  • enter MIDI trigger / instrument effects
  • ...

STARTUP CALIBRATION MODE

  • when holding pushbutton during startup:
    • open menu to scroll instruments
    • select instrument and set display values:
INSTR THRESH CROSSINGS DELAY
snare 50 100 20

push: toggle edit mode
turn: either scroll or change val
hold: leave menu

  • save stuff to flash?

pushbutton event listener

there should be a vector of event listeners for the pushbutton. modes, instruments etc should be able to create a listener with a callback function.

e.g. calibration mode can use pushButtonHold to call sth like ascend_menu, while running mode would do save_cc_allocation oder so

stroke detection: timeOut after last hit

like so:

Instruments.h:

    // sensitivity and instrument calibration
    struct SENSITIVITY
    {
        int threshold;
        int crossings;
        int noiseFloor;
        int countTimeAfterStroke = 10;
        int timeOutAfterLastHit = 500;
    } sensitivity;

    struct TIMING
    {
        volatile unsigned long lastPinActiveTime;
        volatile unsigned long firstPinActiveTime;
        unsigned long lastPinActiveTimeCopy;
        unsigned long firstPinActiveTimeCopy;
        unsigned long lastHitMillis = 0;
        boolean countAfterFirstStroke = false; // start counting after first threshold crossing or using countTimeAfterStroke

...

Instruments.cpp:

bool Instrument::stroke_detected()
{
  noInterrupts();
  timing.lastPinActiveTimeCopy = timing.lastPinActiveTime;
  timing.firstPinActiveTimeCopy = timing.firstPinActiveTime;
  interrupts();

  boolean stroke_criterion = false;
  if (!timing.countAfterFirstStroke && millis() > timing.lastPinActiveTimeCopy + sensitivity.countTimeAfterStroke) // get counts for X ms after LAST hit
    stroke_criterion = true;

  if (timing.countAfterFirstStroke && millis() > timing.firstPinActiveTimeCopy + sensitivity.countTimeAfterStroke) // get counts for X ms after FIRST hit ??
    stroke_criterion = true;

  if (stroke_criterion)
  {
    static int countsCopy;
    noInterrupts();
    countsCopy = timing.counts;
    timing.counts = 0;
    interrupts();

    // ---------------------------- found significant count!
    if (countsCopy >= sensitivity.crossings)
    {
      return true;
    }
    else // timing ok but no significant counts
    {
      return false;
    }
  }
  else // not enough millis elapsed yet
  {
    {
      return false;
    }
  }
}

unfortunately, with this implementation, the machine seems to "remember" strokes that have been detected in the meantime and runs the trigger function right after the timeOut hast elapsed..

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.