Code Monkey home page Code Monkey logo

shawzinbot's Introduction

ShawzinBot Logo

ShawzinBot is a program which converts a MIDI input or file to a series of key presses for the Shawzin. Any MIDI input works with this script (a MIDI keyboard, a virtual MIDI channel, etc), as well as Standard MIDI Files (SMF).

Virus Scan

You can check the virus scan for the precompiled version here.

Download

You can always get the latest version of ShawzinBot here.

About

What's the ShawzinBot?

ShawzinBot is a third party software that can read MIDI files (.mid) and play their content in Warframe. It simulates key presses, and that's how the Shawzin is played.

Is it safe?

ShawzinBot does not in any way interfere with gameplay, nor does it inject new code or modify existing one. It also does not tamper with memory in any way, thus is can't be catalogued as a cheat and should be safe to use.

How does it work?

ShawzinBot is built on the C# DryWetMIDI midi library by melanchall. This library loads a MIDI file and plays it. Every note event is intercepted by ShawzinBot and depending on note's ID, a different combination of keys is pressed to play the sound. ShawzinBot also allows the usage of external MIDI devices (keyboard, synthesizers, etc).

Getting Started

Using ShawzinBot is quite easy. As long as you don't separate any of it's components, it can sit anywhere in your computer. No installation is required, all you need to do is double click ShawzinBot.exe and you'll be good to go! Please note, you MUST match the the game's scale with the one displayed by the bot!

Usage

Once the program is running you'll see the following window:

ShawzinBot Overview

On the top left corner there's a button you can click to open and load MIDI files. Once a file is open, all you have to do is click play and tab back into game. ShawzinBot will not mess with your keyboard unless you're tabbed into Warframe!

To use an external MIDI device, all you have to do is select if from the dropdown menu and start playing. If you do not see your device, just click the reload button to the right of the dropdown.

The program defaults to playing the first MIDI track found inside the file. If you want to play a different track or tracks, all you have to do is open the "MIDI Tracks" dropdown and select the tracks there. Simple.

There are 3 settings you can change at this moment:

  • Whammy - This will enable the whammy. Default off.
  • Transpose notes - This setting will attempt to transpose notes that are unplayable. Default on.
  • Play MIDI through speakers - This will play the MIDI file through your main sound device. Useful for testing songs. Default off.

Special Thanks

  • @lilggamegenius - For helping with figuring out the key presses in game.
  • /u/T2k5 - For making the original full keyboard script.

Notes

  • Multiple keys at the same time don't really work correctly due to Shawzin limitations, you can offset notes by a tiny bit to fix this issue.

shawzinbot's People

Contributors

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

shawzinbot's Issues

when rewinding "slider" goes crazy

after rewinding to any time on song the slider twitches to previous position (mine almost always twitches to first ~30 seconds of song and then back to time i set) ((this happens every ~1 second))
with any songs

Song instantly stops

As soon as I click play, the bot tabs into Warframe and then immediately cancels/deselects the song.

Bot Immedaitely Stops When Pressing Any Keys or Clicking the Mouse

If I hit play, on any midi file, it will begin playing on the program, but never switch to warframe, so no keys are being sent to the game. I cannot technically verify if any keys are being hit. If I click, or hit any key at all, the program pauses playback of the midi. I cannot alt+tab to the game, or click over to make it the active window. This occurs both while running as administrator and not.

ShawzinBot doesn't seem to work at all

For reference I am using a simple test MIDI file (Mary had a little lamb), and although it plays back through the interface fine, it does absolutely nothing but open Warframe. For reference, I have the Tiamat Shawzin equipped and ready, with both the number keys and mouse buttons mapped to the strings, and the arrow keys and N-L-M mapped to the frets, but no input attempt is being made by Shawzin Bot.

The scales are matched, no MIDI input device is selected (as none are available), and under MIDI tracks I have the option of toggling "piano" which I leave toggled on.

I am running it as administrator, and have tried it using other MIDI files too - is there some part of the config I am missing completely?

new version not working correctly

When I would try to minimize or alt+tab to warframe after selecting play, it would stop playing the midi and no notes would be transposed. how do i fix this?

Shawzin variation compatibility

an update is needed to improve the compatibility with the newly added Shawzins.
Currently im forced to Edit songs and scale up or down entire rows in order for them to work.

Newest version skips too many notes

Hello!

I'm trying out the new version with the new scaling, but it's skipping a bunch of notes. Is this because of the new scale, or because of some shawzin note limitation?

Hopefully not the second, because then DE is flat out evil having ruined my ability to play songs I make with MIDI... 😞

Need help in understanding music theory

Hello, I've been trying to port your project into one for Genshin Impact's Lyre.

I don't know much about music theory, so I would like some help on how I'd do it. I mostly just experimented, and I ended up changing just the part which key corresponded to which note, as well as remove vibrator and mostly keep the transposition code intact.

Unfortunately, there is no such thing as flat notes or sharps in the lyre so it sounds like this:

2021-03-30_19-19-47.mp4

The keyboard layout of the lyre is

QWERTYU
ASDFGHJ
ZXCVBNM

In turn, I asked someone with some music knowledge to help me and I ended up with this format, I don't know if it's exactly correct though, but here is an example of how it sounds like.

2021-03-30_17-30-56.mp4
private static readonly Dictionary<int, VirtualKeyCode> lyreNotes = new Dictionary<int, VirtualKeyCode>
{
    {45, VirtualKeyCode.VK_Z}, // A2
    {47, VirtualKeyCode.VK_X}, // B2
    {49, VirtualKeyCode.VK_C}, // C2
    {50, VirtualKeyCode.VK_V}, // D3
    {52, VirtualKeyCode.VK_B}, // E3
    {54, VirtualKeyCode.VK_N}, // F#3
    {56, VirtualKeyCode.VK_M}, // G#3

    {57, VirtualKeyCode.VK_A}, // A3
    {59, VirtualKeyCode.VK_S}, // B3
    {61, VirtualKeyCode.VK_D}, // C#3
    {62, VirtualKeyCode.VK_F}, // D4
    {64, VirtualKeyCode.VK_G}, // E4
    {66, VirtualKeyCode.VK_H}, // F#4
    {68, VirtualKeyCode.VK_J}, // G#4

    {69, VirtualKeyCode.VK_Q}, // A4
    {71, VirtualKeyCode.VK_W}, // B4
    {73, VirtualKeyCode.VK_E}, // C#4
    {74, VirtualKeyCode.VK_R}, // D5
    {76, VirtualKeyCode.VK_T}, // E5
    {78, VirtualKeyCode.VK_Y}, // F#5
    {80, VirtualKeyCode.VK_U}  // G#5
};
public static bool PlayNote(NoteOnEvent note, bool enableVibrato, bool transposeNotes)
{
    if (!IsWindowFocused(_lpWindowName))
        return false;

    var noteId = (int) note.NoteNumber;
    if (!lyreNotes.ContainsKey(noteId) && transposeNotes)
        noteId = TransposeNote(noteId);

    PlayNote(noteId);
    return true;
}

private static int TransposeNote(int noteId)
{
    while (true)
    {
        if (lyreNotes.ContainsKey(noteId)) return noteId;

        if (noteId < lyreNotes.Keys.First())
            noteId = lyreNotes.Keys.First() + noteId % 12;
        else if (noteId > lyreNotes.Keys.Last())
            noteId = lyreNotes.Keys.Last() - 15 + noteId % 12;
        else
            noteId++;
    }
}

[Feature Request] Button to reset to chromatic scale

It would be nice to have a button which we can click to signalize the bot that the Shawzin got set to "chromatic" scale again.
I use Ableton Live to send midi data to the shawzin bot but this would work with any other external midi source as well. When you restart the sequence and set the shawzin back to chromatic scale it tries to work from the last used scale. So the only way to start again from chromatic scale is restarting the bot.

An additional idea would be using an unused midi note like c-1 (midi note code 0) as a reset note as well.

Immediate crash with newest version

As title says, the newest release of ShawzinBot immediately crashes on my system. Running Windows 7 64bit, and the previous version still works fine. Really happy to see this getting an update; I play around with it nearly daily, and have got a nice collection of MIDI's I play to my clan and squadmates, so thanks for making a wicked piece of kit!

Here is the crash log that windows spat at me:

Problem signature:
Problem Event Name: CLR20r3
Problem Signature 01: ShawzinBot.exe
Problem Signature 02: 2.2.2.3
Problem Signature 03: 94504a0b
Problem Signature 04: System
Problem Signature 05: 4.8.4001.0
Problem Signature 06: 5d37b3ae
Problem Signature 07: a25
Problem Signature 08: 21a
Problem Signature 09: N3CTRYE2KN3C34SGL4ZQYRBFTE4M13NB
OS Version: 6.1.7601.2.1.0.256.1
Locale ID: 1033
Additional Information 1: 0a9e
Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
Additional Information 3: 0a9e
Additional Information 4: 0a9e372d3b4ad19135b953a78882e789

Hotkey To Stop?

Would be nice if we can have a hotkey to stop playing midi.

Playback stops when note is out of bounds

If transpose is off, playback stops as soon as the next note is not within the playable range. Clicking play may produce one more note before stopping again, proving that there are subsequent notes still in range.

Out of range notes should be ignored and the application should continue to move on.

Crashes When Trying to Load Song

Whenever I attempt to load a midi file the program immediately freezes and a window saying "ShawzinBot has stopped working" pops up, followed by the program closing.

Visual Studio 2019 gave me a debug option so I let it run.

It stated:
"The application is in break mode
Your app has entered a break state, but there is no code to show because all threads were executing external code (typically system or framework code)."
Along with the following window:
image

request

can u make bot for undawn guitar?

Bot fails to press frets

as mentioned above. I tried to set the frets to mouse buttons (default keys now are left, down and right arrow keys), ran the bot w/ admin and still can't get it to work

Sounds very, very weird.

No matter what midi i put in, no matter what octave i choose, it always sounds like some weird nightmare. I tried "Awesome God", the popular song. It doesnt work, at all. It sounds like circus music straight out of hell. Is the bot broken?

Feature Requests

Some features I think would be helpful:

Pause/Play MIDI Shortcut

I think it would be helpful to have a shortcut to pause a MIDI file because trying to exit while one is playing can cause Windows shortcuts to activate or Warframe changes its resolution etc.

Reset ShawzinBot Button

I think adding a button to easily close and relaunch the program would be helpful incase something gets messed up while playing.

Default MIDI Input Config

I keep having to select my MIDI keyboard everytime I launch the program so I think it would be helpful to be able to change the default input or remember the last one you picked.

Thank you for this awesome program! Endgame has been achieved.

In game record not supported

I tried recording a song with shawzin bot but it never let me change scale. for example, I started recording in chromatic scale and want/need to change to pentatonic minor but it never let me. it is locked in the scale you started to record.

Weird Issue with Frets.

Might be unrelated to the bot itself but for some reason it doesn't use the Frets but it does send the input, so the problem might be with me or Warframe.
I do start the bot as admin, have the controls on default and can see that the input does come in, since when i open the menu while playing something it is selecting through the menu-tabs like when you use the arrow keys.
I don't have a way to see if the input itself isn't send anymore (which i don't think) or if my game just ignores the input for some reason.

New Scaling

Hey they've add a new scale today you've probs seen it by now but it kinda messes with every thing notes don't seem to transition the same way as they did before i.e. different notes are being played instead of the correct ones

the new control scheme

the new control scheme for the shawzin makes it so that the bot doesn't work anymore, even when i rebinded the arrows to be the mouse buttons

Playing fast paces songs/songs with lots of notes lagging game

When playing something like "Through Fire and Flames" the game will begin to heavily lag, even bugging the audio at times. is there a way to fix this, weather it be through the bot itself or in-game?

note: my game usually runs around 120fps. but when playing the songs that have many notes, it can go down to only 1-7fps

Hope to provide Chinese version of waframe support~

希望提供**版本的waframe支持。
Hope to provide Chinese version of waframe support.

仅需要将原来的 "Warframe" 窗口句柄修改为 "星际战甲" 即可。
You only need to change the original "warframe" window handle to "星际战甲".

谢谢。
Thank you.

volume in c# version

Ahk version somehow was able to translate different volume of specific track of midi file (it useful you can adjust one instrument for better sound). Is it possible in C# version?

Shawzin bot taking steam screenshots while plaing

that's is, that's the bug, i tried to remove the screenshot key but that didn't work, warframe screenshots kept coming
v2.2.2.3

issue seems to be caused depending on midi, it defenitively happened with the rockfeller streets midi zipped below
Rockefeller_Street.zip
i personally have no idea why it's taking steam screenshots

Strings, Scales and Vibrato are working but Frets are not

Hi, I love concept of your bot and thanks for creating it <3

unfortunately it's not working for me, because of the problem described in the title.
I've tried different MIDI files and changing keybindings to N, L, M, as suggest in now closed thread, but nothing works :c

Thanks in advance for any help

ShawzinBot needs to be closed and then re-opened to play midis in tune again

If you play a midi to the end with Shawzinbot or pause it in the middle of the song, then play that same midi or any other midi, it will play out of tune even if you switch to chromatic again first. It works the first time, but it is kind of annoying to have to relaunch ShawzinBot every time you load up a new midi for it to work properly.

This has been an issue since the Yo scale was added in 2.1, if that's helpful information.

ShawzinBot crashes on MIDI files with Track0

Certain MIDI files that have only 1 track, Track0 will crash the Bot.
Also if the file has multiple tracks the bot will not read Track0
in this case i had to create a New empty track and Move all the notes to it so the Bot doesn't skip them or crash.
image

Windows "Open with" and default program support

I would like to see support for opening files using Windows "Open with" and the default program/association support. I have created a fork and you can see the changes I have added to the repository. This would allow people to use shortcuts to the file, use command line args, use Open with, etc.

All channels plays the same

Hello there! After last Warframe update, all channels in midi file started to play together, no matter do I check them to play or not. That happens on every midi that I chose. Can you please check that? I'm not sure that exactly warframe hotfix can brake the way how bot decides what channels to play, so I also suppose that I'm doing something wrong.
That's very odd for me.
Thank you.

New Shawzin Additions Don't Play MIDI Chords

The Corbu and Tiamat Shawzins currently only play one note at a time instead of chords like the Nelumbo and Dax's/Mimica/etc. Would hope for chord compatibility to be added.

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.