Code Monkey home page Code Monkey logo

m8c's People

Contributors

bloopclick avatar daniel214 avatar ferrix avatar gunnbr avatar jasonporritt avatar jeffalyanak avatar jmolero avatar jonnekokkonen avatar laamaa avatar lownin avatar m-hayabusa avatar ryandam avatar smootalicious avatar spaceykasey avatar trash80 avatar v3rm0n avatar warrobot10 avatar

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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

m8c's Issues

Idea/Help - text/console only mode

I am using m8c with great success. Thank you!

I have installed it on a norns and it functions with a forwarded X display, however it is very laggy and the keyboard controls are often doubled. I'm not asking for a fix.

I wondered if a Text mode could be done - possibly with ncurses. I can try myself, but I can't figure out how to interpret the display stream to convert over to a text display. I may be completely mistaken in taking this approach, but I wondered if you thought it may be possible and point me in the right direction.

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!

Reduce coupling on libserialport

I'm building m8c for Android downstream, with a hope of upstreaming it at some point if there is interest. Unrooted Androids do not seem to have direct access to serial ports, instead you get the USB device you want to use in Java side (dealing with permissions etc.),open a connection, claim the CDC/ACM interfaces and pass the file descriptor to the native code where you can communicate with the device.
Since libserialport doesn't deal with file descriptors, something like libusb needs to be used instead.

So my proposal is to:

  • Move dependencies to libserialport.h to one file
  • Create more abstract functions to deal with serial init, read and write. Something that doesn't have dependencies on libserialport.h
  • Use something like #ifdef LIBSERIALPORT in the .c files to turn libserialport dependency on and off.

I'm not a C developer in any capacity so ideas are welcome.

This is something I'm going to do anyway so it's not a request for somebody else to do it, more like a check to see if I should attempt to upstream it as well.

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)

[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+?

[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!!

Audio routing startup script

I have Jackd routing the audio, I added the commands from the readme in a script and it works when I run the script manually. However when I try to add this script to be executed at boot by rc.local it just doesn't want to run. Is there some trick to this? It's pretty annoying to have to initiate the script manually in order to get some sound after every restart. Any tips?

Pop!_OS serial ioctl

I've seen a couple people have this issue with Pop_OS, which must be doing something a bit differently than Debian in its serial setup.

I can confirm that the device is readable and writeable by the user, since screen and minicom work fine.

Debug is as follows:

INFO: Opening port.
sp: sp_open(0x55bf311d1b30, 0x3) called.
sp: Opening port /dev/ttyACM0.
sp: get_config(0x55bf311d1b30, 0x7fff7e9c83e0, 0x7fff7e9c83b0) called.
sp: Getting configuration for port /dev/ttyACM0.
sp: get_flow(3, 0x7fff7e9c83e0) called.
sp: Getting advanced flow control.
sp: sp_last_error_message() called.
sp: sp_last_error_message returning Inappropriate ioctl for device.
sp: get_flow returning SP_ERR_FAIL: Getting termiox failed: Inappropriate ioctl for device.
sp: sp_free_error_message(Inappropriate ioctl for device) called.
sp: sp_free_error_message returning.
sp: get_config returning SP_ERR_FAIL.
sp: sp_close(0x55bf311d1b30) called.
sp: Closing port /dev/ttyACM0.
sp: sp_close returning SP_OK.
sp: sp_open returning SP_ERR_FAIL.
sp: sp_last_error_message() called.
sp: sp_last_error_message returning Inappropriate ioctl for device.
sp: sp_free_error_message(Inappropriate ioctl for device) called.
sp: sp_free_error_message returning.
Aborted (core dumped)

I'll investigate and look towards implementing a fix.

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.

CRITICAL: Error -2 reading serial

I quite often get the following error and m8c disconnects. I've managed to reproduce this when using samples, it'll happen after about 20 seconds of playback. Other times it appears out of nowhere with only using the FM synth.

Is there any way to get more information on what caused the error? I thought it might be the SD card isn't up to scratch but I'm using a Sandisk Ultra 32GB and used the SD card formatter to format it in Fat32 format.

CRITICAL: Error -2 reading serial

EDIT:

I'm using MacOS Monteray on a decent spec recent i7 with far too much ram. I'm not sure the machine is the issue though.

I'm running M8_V2_5_3B_HEADLESS

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.

can't run m8c on Ubuntu 20.04.4 LTS

so as a Side effect of trying to get m8c to run on the pocketchip, I gave it a go on my laptop and it compiles fine and everything it finds the m8 then I get

ERROR: Error: Failed: Inappropriate ioctl for device

not really sure what causes this. This doesn't happen on debian 11. I may try my other machine running lubuntu

Termux and/or Android support

Thanks for creating m8c! It's an amazing experience to try it out together with a Teensy 4.1 on Linux, and a great way to check out the Dirtywave M8 and "try before you buy".

I tried packaging m8c for Termux, but apparently packaging libserialport was not straightforward: termux/termux-packages#9315

I also tried packaging m8c as an SDL2 application, for Android (as an .apk file), but including SDL2 in the various available Android build systems was more of a hassle than I had anticipated.

This is a feature request for somehow, either through Termux or as an Android application, support m8c on Android.

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 !

Fullscreen flag in config.ini not working

I'm getting my headless M8 up and running on a raspberry pi, with the intent of having a fully standalone unit. In pursuit of this, I have set up the m8c application to run at startup, and I'm trying to find a way to get it to start automatically in fullscreen mode, as the display I'm using is a Hyper Pixel 4 inch display that hangs off the GPIO on the host Pi, and screen real estate is limited. I have tried changing the fullscreen flag to true in m8c's config.ini, which didn't work. Also tried changing the c.init_fullscreen variable in config.c to "1", with no luck, either. Additionally, I have tried executing m8c with flags from the command line (-fs, -maximize, -fullscreen; all with both one and two dashes preceeding), which had no effect.

Any thoughts on how I can get m8c to start up in fullscreen when starting the application from a linux autostart .desktop entry? Thanks so much for making this project available! Loving my headless m8, so far :-D

m8c autorun for RPI

sudo /home/pi/code/m8c/m8c - not working

maybe I'm doing something wrong?

app bundle won't run on macos 10.14

expected: double-clicking downloaded app runs m8c.

actual:

  • it displays incompatible app icon
    Screenshot 2022-11-06 at 19 46 10
  • double-clicking the app shows a "This application requires macOS 10.13 or later" prompt.
    Screenshot 2022-11-06 at 19 46 27
  • running from the console segfaults:
$ ./m8c 
2022-11-06 19:52:08.038 m8c[11889:201100] INFO: Reading config /Users/g/Library/Application Support/m8c/config.ini
2022-11-06 19:52:08.038 m8c[11889:201100] INFO: Writing config file to /Users/g/Library/Application Support/m8c/config.ini
2022-11-06 19:52:08.038 m8c[11889:201100] INFO: Looking for USB serial devices.
2022-11-06 19:52:08.039 m8c[11889:201100] INFO: Found M8 in /dev/cu.usbmodem121139201.
2022-11-06 19:52:08.040 m8c[11889:201100] INFO: Opening port.
Segmentation fault: 11

xattr -r -d com.apple.quarantine path/to/app.app doesn't fix it

but works from source

compiling from source, e.g. make and then ./m8c works fine:

...
2022-11-06 19:54:00.637 m8c[11915:202571] INFO: Looking for USB serial devices.
2022-11-06 19:54:00.639 m8c[11915:202571] INFO: Found M8 in /dev/cu.usbmodem121139201.
2022-11-06 19:54:00.639 m8c[11915:202571] INFO: Opening port.
2022-11-06 19:54:01.098 m8c[11915:202571] INFO: Looking for game controllers
2022-11-06 19:54:01.109 m8c[11915:202571] INFO: Trying to open game controller database from /Users/g/Library/Application Support/m8c/gamecontrollerdb.txt
2022-11-06 19:54:01.109 m8c[11915:202571] INFO: Trying to open game controller database from /Volumes/data/_music/M8/headless/m8c/src/m8c/gamecontrollerdb.txt
2022-11-06 19:54:01.110 m8c[11915:202571] INFO: Found 37 game controller mappings
2022-11-06 19:54:01.110 m8c[11915:202571] INFO: Enabling and resetting M8 display
2022-11-06 19:54:01.115 m8c[11915:202571] INFO: Reset display
2022-11-06 19:55:05.653 m8c[11915:202571] INFO: Received msg_quit from input device.
2022-11-06 19:55:05.664 m8c[11915:202571] INFO: Shutting down
2022-11-06 19:55:05.667 m8c[11915:202571] INFO: Disconnecting M8

m8c the answer is Abort

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

pi@raspberrypi:~ $ m8c /dev/ttyAMC0
INFO: Looking for USB serial devices.
INFO: Found M8 in /dev/ttyACM0.
INFO: Opening port.
Abandon
pi@raspberrypi:~ $

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

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.

License questions

Hi.

I like your project and wanted to create an AUR (Arch Linux user repository) package for it. But that requires me to put the package license in the metadata but I could not find information on which license this project uses.

Unable to open M8C

nathan@nathan-laptop:~/code/m8c$ ./m8c
INFO: Reading config /home/nathan/.local/share/m8c/config.ini
INFO: Looking for USB serial devices.
INFO: Found M8 in /dev/ttyACM0.
INFO: Opening port.
INFO: Enabling and resetting M8 display
INFO: Reset display
dbus[7724]: arguments to dbus_message_new_method_call() were incorrect, assertion "path != NULL" failed in file ../../../dbus/dbus-message.c line 1362.
This is normally a bug in some application using the D-Bus library.

D-Bus not built with -rdynamic so unable to print a backtrace
Aborted (core dumped)
nathan@nathan-laptop:~/code/m8c$

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.

m8c failed to running

Hallo,
Here is the error.

cpi@fei20th:~/app/m8c$ ./m8c
INFO: Reading config /home/cpi/.local/share/m8c/config.ini
INFO: Writing config file to /home/cpi/.local/share/m8c/config.ini
INFO: Looking for USB serial devices.
INFO: Found M8 in /dev/ttyACM1.
INFO: Opening port.
ERROR: Error: Failed: Inappropriate ioctl for device

cpi@fei20th:~/app/m8c$ sudo LIBSERIALPORT_DEBUG=1 m8c
INFO: Reading config /root/.local/share/m8c/config.ini
INFO: Writing config file to /root/.local/share/m8c/config.ini
INFO: Looking for USB serial devices.
sp: sp_list_ports(0xffffdc5b6650) called.
sp: Enumerating ports.
sp: Enumerating tty devices.
sp: Iterating over results.
sp: Found device /dev/ttyS6.
sp: serial8250 device, attempting to open.
sp: Port type is unknown, skipping.
sp: Found device /dev/ttyS4.
sp: serial8250 device, attempting to open.
sp: Port type is unknown, skipping.
sp: Found device /dev/ttyS2.
sp: serial8250 device, attempting to open.
sp: Port type is unknown, skipping.
sp: Found device /dev/ttyACM0.
sp: Found port /dev/ttyACM0.
sp: sp_get_port_by_name(/dev/ttyACM0, 0xaaaac42fb300) called.
sp: Building structure for port /dev/ttyACM0.
sp: get_port_details returning SP_OK.
sp: sp_get_port_by_name returning SP_OK.
sp: Found device /dev/ttyS7.
sp: serial8250 device, attempting to open.
sp: Port type is unknown, skipping.
sp: Found device /dev/ttyS5.
sp: serial8250 device, attempting to open.
sp: Port type is unknown, skipping.
sp: Found device /dev/ttyS3.
sp: serial8250 device, attempting to open.
sp: Port type is unknown, skipping.
sp: Found device /dev/ttyS1.
sp: serial8250 device, attempting to open.
sp: Port type is unknown, skipping.
sp: Found device /dev/ttyACM1.
sp: Found port /dev/ttyACM1.
sp: sp_get_port_by_name(/dev/ttyACM1, 0xaaaac42fb308) called.
sp: Building structure for port /dev/ttyACM1.
sp: get_port_details returning SP_OK.
sp: sp_get_port_by_name returning SP_OK.
sp: sp_list_ports returning SP_OK.
sp: sp_get_port_transport(0xaaaac42fb6d0) called.
sp: sp_get_port_transport returning 1.
sp: sp_get_port_usb_vid_pid(0xaaaac42fb6d0) called.
sp: sp_get_port_usb_vid_pid returning SP_OK.
sp: sp_get_port_transport(0xaaaac42fb7d0) called.
sp: sp_get_port_transport returning 1.
sp: sp_get_port_usb_vid_pid(0xaaaac42fb7d0) called.
sp: sp_get_port_usb_vid_pid returning SP_OK.
sp: sp_get_port_name(0xaaaac42fb7d0) called.
sp: sp_get_port_name returning /dev/ttyACM1.
INFO: Found M8 in /dev/ttyACM1.
sp: sp_copy_port(0xaaaac42fb7d0, 0xffffdc5b6648) called.
sp: Copying port structure.
sp: sp_get_port_by_name(/dev/ttyACM1, 0xffffdc5b6648) called.
sp: Building structure for port /dev/ttyACM1.
sp: get_port_details returning SP_OK.
sp: sp_get_port_by_name returning SP_OK.
sp: sp_copy_port returning 0.
sp: sp_free_port_list(0xaaaac42fb300) called.
sp: Freeing port list.
sp: sp_free_port(0xaaaac42fb6d0) called.
sp: Freeing port structure.
sp: sp_free_port returning.
sp: sp_free_port(0xaaaac42fb7d0) called.
sp: Freeing port structure.
sp: sp_free_port returning.
sp: sp_free_port_list returning.
INFO: Opening port.
sp: sp_open(0xaaaac42fb8d0, 0x3) called.
sp: Opening port /dev/ttyACM1.
sp: get_config(0xaaaac42fb8d0, 0xffffdc5b6590, 0xffffdc5b6568) called.
sp: Getting configuration for port /dev/ttyACM1.
sp: get_flow(3, 0xffffdc5b6590) called.
sp: Getting advanced flow control.
sp: sp_last_error_message() called.
sp: sp_last_error_message returning Inappropriate ioctl for device.
sp: get_flow returning SP_ERR_FAIL: Getting termiox failed: Inappropriate ioctl for device.
sp: sp_free_error_message(Inappropriate ioctl for device) called.
sp: sp_free_error_message returning.
sp: get_config returning SP_ERR_FAIL.
sp: sp_close(0xaaaac42fb8d0) called.
sp: Closing port /dev/ttyACM1.
sp: sp_close returning SP_OK.
sp: sp_open returning SP_ERR_FAIL.
sp: sp_last_error_message() called.
sp: sp_last_error_message returning Inappropriate ioctl for device.
ERROR: Error: Failed: Inappropriate ioctl for device
sp: sp_free_error_message(Inappropriate ioctl for device) called.
sp: sp_free_error_message returning.

Linux / m8c fails to start at "INFO: Reset display" / invalid ioctl

Some users have reported problems with starting m8c:

pi@retropie:~/code/m8c $ ./m8c
INFO: Looking for USB serial devices.
INFO: Found M8 in /dev/ttyACM1.
INFO: Opening port.
INFO: Enabling and resetting M8 display
INFO: Reset display

and after that, the program returns into terminal.

Sometimes the error might look something like:

INFO: Reading config /home/jonne/.local/share/m8c/config.ini
INFO: Writing config file to /home/jonne/.local/share/m8c/config.ini
INFO: Looking for USB serial devices.
INFO: Found M8 in /dev/ttyACM1.
INFO: Opening port.
ERROR: Error: Failed: Inappropriate ioctl for device

This seems to be a conflict with some Linux kernel versions and libserialport (sigrokproject/libserialport@6f9b03e) and the error can be mitigated by building libserialport from sources:

  1. Remove existing libserialport packages
    for example, on Debian based systems apt-get remove libserialport0 libserialport-dev
  2. Build libserialport from source code according to instructions in https://github.com/sigrokproject/libserialport
  3. Rebuild m8c

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.

Windows 32 Bit Build?

Is it possible to compile M8C to run on Windows 32 bit systems? If so, how would I go about that?

Thanks!

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.