m8c is a client for Dirtywave M8 tracker's headless mode.

Overview

m8c

m8c is a client for Dirtywave M8 tracker's headless mode. The application should be cross-platform ready and can be built in Linux, Windows (with MSYS2/MINGW64) and Mac OS.

Please note that routing the headless M8 USB audio isn't in the scope of this program -- if this is needed, it can be achieved with tools like jackd, alsa_in and alsa_out for example. Check out the guide in file AUDIOGUIDE.md for some instructions on routing the audio.

Many thanks to:

Trash80 for the great M8 hardware and the original font (stealth57.ttf) that was converted to a bitmap for use in the progam.

driedfruit for a wonderful little routine to blit inline bitmap fonts, https://github.com/driedfruit/SDL_inprint/

marcinbor85 for the slip handling routine, https://github.com/marcinbor85/slip

turbolent for the great Golang-based g0m8 application, which I used as reference on how the M8 serial protocol works.

Disclaimer: I'm not a coder and hardly understand C, use at your own risk :)


Installation

These instructions are tested with Raspberry Pi 3 B+ and Raspberry Pi OS with desktop (March 4 2021 release), but should apply for other Debian/Ubuntu flavors as well.

The instructions assume that you already have a working Linux desktop installation with an internet connection.

Open Terminal and run the following commands:

Install required packages

sudo apt update && sudo apt install -y git gcc make libsdl2-dev libserialport-dev

Download source code

mkdir code && cd code
git clone https://github.com/laamaa/m8c.git

Build the program

cd m8c
make && sudo make install

Start the program

Connect the Teensy to your computer and start the program. It should automatically detect your device.

m8c

If the stars are aligned correctly, you should see the M8 screen.


Keyboard mappings

Keys for controlling the progam:

  • Up arrow = up
  • Down arrow = down
  • Left arrow = left
  • Right arrow = right
  • a / left shift = select
  • s / space = start
  • z / left alt = opt
  • x / left ctrl = edit

Additional controls:

  • Alt + enter = toggle full screen / windowed
  • Alt + F4 = quit program
  • Delete = opt+edit (deletes a row)
  • Esc = toggle keyjazz on/off

Keyjazz allows to enter notes with keyboard, oldschool tracker-style. The layout is two octaves, starting from keys Z and Q. When keyjazz is active, regular a/s/z/x keys are disabled.

Gamepads

The program uses SDL's game controller system, which should make it work automagically with most gamepads.

Enjoy making some nice music!


Bonus: improve performance on the Raspberry Pi

Enabling the experimental GL Driver with Full KMS can boost the program's performance a bit.

The driver can be enabled with sudo raspi-config and selecting "Advanced options" -> "GL Driver" -> "GL (Full KMS)" and rebooting.

Please note that with some configurations (for example, composite video) this can lead to not getting video output at all. If that happens, you can delete the row dtoverlay=vc4-kms-v3d in bottom of /boot/config.txt.

Further performance improvement can be achieved by not using X11 and running the program directly in framebuffer console, but this might require doing a custom build of SDL.

Comments
  • using the dirty flag in render causes poor framerate on Ondroid Go devices

    using the dirty flag in render causes poor framerate on Ondroid Go devices

    Per https://discord.com/channels/709264126240620591/879940212690669578/982689334090158120 (@aquarat on discord) discovered that using the dirtyflag in https://github.com/laamaa/m8c/blob/main/render.c#L221 seems to cause very low framerate on Odroid Go (Advance,Super) devices running Ubuntu 18.04 distro from the vendor (Hardkernel).

    I'm not sure why this would be the case, but for the time being, @laamaa would you be open to having a config flag to allow disabling the use of that if, maybe even a C preprocessor macro for now? defaulted to off but so anyone building for these devices could set it rather than maintaining a fork.

    opened by maks 17
  • Performance issues on raspberry pi 2, 3, etc

    Performance issues on raspberry pi 2, 3, etc

    Hey! I wanted to mention I had heard this wasn't working great on anything older than a RPI4. I had a spare RP2 that I wanted to attempt to run this on because I just didn't think it should be particularly resource intensive and found that it was maxing the CPU and barely functional. It looks like the Accelerated SDL2 render is the cause.
    I switched the SDL renderer const in renderer.c to SDL_RENDERER_SOFTWARE and now it runs perfect on a PI2 using only like 10% CPU.
    Thanks!
    Kasey

    opened by SpaceyKasey 15
  • Added config and handling for special game controller buttons to quit and reset display.

    Added config and handling for special game controller buttons to quit and reset display.

    On a game controller, using the M8 defined buttons can cause conflicts with defined M8 functionality, or simply fail to quit in the case of no attached keyboard to execute a quit. I added special game controller configs to quit and reset the display using any of the unused/unmapped to M8 buttons in combination with the defined "Select" button. The defaults are quit = select + SDL_CONTROLLER_BUTTON_RIGHTSTICK and reset display = select + SDL_CONTROLLER_BUTTON_LEFTSTICK.

    opened by smootalicious 12
  • m8c the answer is Abort

    m8c the answer is Abort

    Hello, m8c seems not working. After running m8c the response is Abort.

    [email protected]:~ $ m8c /dev/ttyAMC0 INFO: Looking for USB serial devices. INFO: Found M8 in /dev/ttyACM0. INFO: Opening port. Abandon [email protected]:~ $

    opened by decadenet 9
  • Crash when selecting parameters to modulate

    Crash when selecting parameters to modulate

    Hi !

    First of all, thank you to the creators of this great software.

    On my Zorin 16 OS, it works very well but crashes every time I go to the screen where you select which parameter will be parameter-locked (the screen with the names of all available parameters). I hope I'm clear... I know it's M8c crashing and not the M8, because the music continues to play, and when I relaunch m8c I'm still on the same page (and it crashes again after a few seconds if I don't leave this screen very fast).

    Thank you !

    opened by Actual-Guilll 8
  • [SHIFT]+[OPTION] on gamepad doesn't enter selection mode?

    [SHIFT]+[OPTION] on gamepad doesn't enter selection mode?

    Hi! I'm just getting started with my Raspberry Pi headless setup with an 8BitDo NS30 pro controller. In qjoypad, I can see my buttons are reflected exactly as they should be, and I can press shift and option at the same time and see them both light up.

    However, in m8c, this combo does not seem to do anything. Pressing and holding both at the same time, my arrows move between screens as if only shift was held. No magenta highlight as I get with the keyboard. I notice [SHIFT]+[EDIT] does paste as expected, so not all combos seem to have this issue.

    Have I missed something? Any guess what might be happening? m8c seems awesome, otherwise. I really appreciate the work going into it!!

    opened by djthread 7
  • Can't compile on pocketchip ARM

    Can't compile on pocketchip ARM

    attempting to compile on a arm device running debian Stretch this is use KainXKitsune on the discord. I get errors of undefined reference to and a lot of them are egl_window "wl_egl_window_get_attached_sized" for example.

    opened by PyroXFire 7
  • FR: Supporting non button sdl keys?

    FR: Supporting non button sdl keys?

    I have an 8bitdo controller, with the following mappings

    Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Mac OS X,"

    How do I map the h0.8 etc ones? It doesn't seem to support them in the ini. If I map the directions to a regular button it seems to work as intended.

    enhancement 
    opened by peterswimm 6
  • add key-combination to quit m8c

    add key-combination to quit m8c

    This makes the select+start key combination generate a quit message, to exit m8c.

    This is useful for people running m8c on handheld games consoles for example, where there is no other way to cleaniy exit m8c.

    opened by maks 5
  • [Raspberry Pi] Crash of the gui when using the fm synth

    [Raspberry Pi] Crash of the gui when using the fm synth

    Thank you for this client!!. I have a problem when using the FM synths. As soon as I set complex waveforms, the gui disappears but the sound stays on. This happens particularly quickly when using noise. I can start the m8c again from the terminal, but after a few seconds it crashes again. Could it be because I am using an RPi4 instead of an RPi3b+?

    opened by klingklangmatze 5
  • Steam Deck compatibility?

    Steam Deck compatibility?

    I know it probably won't and I doubt it has been tested yet but does anyone have and Idea if it will work on the Steam Deck from Valve? I should have mine in the coming months and I feel like it would be the perfect device to run the M8 headless.

    opened by riffnshred 4
  • default keymap reflexion

    default keymap reflexion

    hello,

    After a while using m8c I've found it was easier to deal with this alternative keymap:

    image

    key_select_alt=29
    key_start_alt=27
    key_opt_alt=4
    key_edit_alt=22
    

    Similarly, with a controller like those cheap USB SNES like:

    image

    gamepad_select=0
    gamepad_start=1
    gamepad_opt=2
    gamepad_edit=3
    

    why?

    because the original DirtyWave M8 is using this key setting:

    image

    This way, with this keymap, you'll get a closer experience. On the original PC keymap the row with option+edit and the row with shitf+play are inverted, which is a bit confusing when reading the documentation with the shortcuts for example...

    just my 2 cents

    btw many thanks for m8c, it's an awesome frontend to my teensy!

    opened by farvardin 0
  • Can't get Quit to work when mapped to gamecontroller button

    Can't get Quit to work when mapped to gamecontroller button

    I've mapped gamepad_quit to one of the buttons on my gamepad (GPI Case 2 which appears as an xbox controller), but it doesn't do anything. If I pair a different control, like edit, to the same button, that works, so the button is correct.

    opened by briwil 1
  • fullscreen=true doesn't work on raspberry bullseye

    fullscreen=true doesn't work on raspberry bullseye

    Setting fullscreen = true in /home/<username>/.local/share/m8c/config.ini doesn't trigger the program to start in fullscreen mode and disables the alt + enter control.

    Model: Raspberry Pi 4 Model B Rev 1.2 OS: Debian GNU/Linux 11 (bullseye)

    help wanted 
    opened by marcel-klasse 7
Releases(v1.3.0)
Owner
Jonne Kokkonen
Personal projects, mostly audio related stuff
Jonne Kokkonen
Triton Python and C++ client libraries and example, and client examples for go, java and scala.

Triton Client Libraries and Examples To simplify communication with Triton, the Triton project provides several client libraries and examples of how t

Triton Inference Server 177 Sep 21, 2022
VEngine-Client - vEngine: Official Client Module

━ S Y N O P S I S ━ Maintainer(s): Aviril, Tron vEngine is Next-Gen Sandbox-Engine being crafted in C++. In contrast to UE/Unity/ReverseEngineered-Mod

ᴠ : ꜱᴛᴜᴅɪᴏ 15 Sep 7, 2022
Pyth-client - client API for on-chain pyth programs

pyth-client client API for on-chain pyth programs Build Instructions # depends on openssl apt install libssl-dev # depends on libz apt install zlib1g

Pyth Network 106 Sep 20, 2022
Webdav-client-cpp - C++ WebDAV Client provides easy and convenient to work with WebDAV-servers.

WebDAV Client Package WebDAV Client provides easy and convenient to work with WebDAV-servers: Yandex.Disk Dropbox Google Drive Box 4shared ownCloud ..

Cloud Polis 103 Aug 30, 2022
This repository provides a C++ client SDK for Unleash that meets the Unleash Client Specifications.

Unleash Client SDK for C++ This repository provides a C++ client SDK for Unleash that meets the Unleash Client Specifications. Features The below tabl

Antonio Ruiz 4 Jan 30, 2022
Run WPS PIN attacks (Pixie Dust, online bruteforce, PIN prediction) without monitor mode with the wpa_supplicant

Overview OneShot-C - implementation of OneShot on C OneShot-С performs Pixie Dust attack without having to switch to monitor mode. Features Pixie Dust

null 15 Aug 12, 2022
The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services.

Welcome! The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design

Microsoft 7k Sep 16, 2022
A C++ header-only HTTP/HTTPS server and client library

cpp-httplib A C++11 single-file header-only cross platform HTTP/HTTPS library. It's extremely easy to setup. Just include the httplib.h file in your c

null 7.7k Sep 16, 2022
Ultra fast and low latency asynchronous socket server & client C++ library with support TCP, SSL, UDP, HTTP, HTTPS, WebSocket protocols and 10K connections problem solution

CppServer Ultra fast and low latency asynchronous socket server & client C++ library with support TCP, SSL, UDP, HTTP, HTTPS, WebSocket protocols and

Ivan Shynkarenka 885 Sep 17, 2022
A portable MQTT C client for embedded systems and PCs alike.

MQTT-C is an MQTT v3.1.1 client written in C. MQTT is a lightweight publisher-subscriber-based messaging protocol that is commonly used in IoT and net

Liam Bindle 534 Sep 20, 2022
C++ client for making HTTP/REST requests

REST client for C++ About This is a simple REST client for C++. It wraps libcurl for HTTP requests. Usage restclient-cpp provides two ways of interact

Daniel Schauenberg 1.4k Sep 16, 2022
Wangle is a framework providing a set of common client/server abstractions for building services in a consistent, modular, and composable way.

Wangle C++ networking library Wangle is a library that makes it easy to build protocols, application clients, and application servers. It's like Netty

Facebook 2.9k Sep 21, 2022
C++ websocket client/server library

WebSocket++ (0.8.2) WebSocket++ is a header only C++ library that implements RFC6455 The WebSocket Protocol. It allows integrating WebSocket client an

Peter Thorson 5.8k Sep 22, 2022
LibVNCServer/LibVNCClient are cross-platform C libraries that allow you to easily implement VNC server or client functionality in your program.

LibVNCServer: A library for easy implementation of a VNC server. Copyright (C) 2001-2003 Johannes E. Schindelin If you already used LibVNCServer, you

null 863 Sep 17, 2022
C++11 implementation of Socket.IO client

By virtue of being written in C++, this client works in several different platforms. The examples folder contains an iPhone, QT and Console example chat client! It depends on websocket++ and is inspired by socket.io-clientpp.

Socket.IO 2k Sep 19, 2022
Client modifications of CoD4 X

CoD4x_Client_pub Client modifications of CoD4 X - this will not be the same as the official released files and you wont be able to join all servers wi

null 36 Aug 24, 2022
A network library for client/server games written in C++

yojimbo yojimbo is a network library for client/server games written in C++. It's designed around the networking requirements of competitive multiplay

The Network Protocol Company 2.2k Sep 13, 2022
Mecha allows you to debug, study, and modify the League of Legends client

Mecha allows you to debug, study, and modify the League of Legends client Usage To use Mecha, you must compile it first. See this for more information

Kovács Bence 47 Sep 20, 2022
Jellyfin Desktop Client based on Plex Media Player

Jellyfin Media Player Based on (but not affiliated with) Plex Media Player. Please see: Corresponding web client: Repo Release API Docs in client-api.

Ian Walton 1.1k Sep 16, 2022