Go Back   Cockos Incorporated Forums > REAPER Forums > MIDI Hardware, Control Surfaces, and OSC

Reply
 
Thread Tools Display Modes
Old 06-27-2012, 03:26 AM   #1
Reflected
Human being with feelings
 
Reflected's Avatar
 
Join Date: Jul 2009
Posts: 3,294
Default Load image to the Midi editor? (convert image to midi) ?

For the shake of art and fun.

Is there a program that can convert drawing/images/pictures to midi files?
Reflected is offline   Reply With Quote
Old 06-27-2012, 07:11 AM   #2
hopi
Human being with feelings
 
hopi's Avatar
 
Join Date: Oct 2008
Location: Right Hear
Posts: 15,618
Default

oh crap... there were some junks like that which would make noise as a wav file from images... really silly
so then I guess you could use something like melodyne to make a midi of the wav... but why? OMG why???? OMFG WHY? hahaha
__________________
...should be fixed for the next build... http://tinyurl.com/cr7o7yl
https://soundcloud.com/hopikiva
hopi is offline   Reply With Quote
Old 06-27-2012, 08:34 PM   #3
bigearz
Human being with feelings
 
bigearz's Avatar
 
Join Date: Aug 2009
Location: Marietta, GA
Posts: 278
Default

Photosounder will convert an image to an audio file. Unless you've got some solid lines somewhere, it won't sound like it has definite pitch. That being said, converting a polyphonic audio file to MIDI is an interesting transformation - guaranteed not to sound like the audio - but if art is what you're after, art is what you'll get! :-)
__________________
Keep your ears open!
https://www.revealaudio.com
Win10 x64, i7 4770, 16GB RAM, KeyLab 88
bigearz is offline   Reply With Quote
Old 09-13-2013, 02:25 AM   #4
Abigail111
Human being with feelings
 
Join Date: Sep 2013
Posts: 1
Default

Hello
If you want to load image,Here is the code:
using RasterEdge.Imaging.Basic.Core;
using RasterEdge.Imaging.Basic.Codec;
using RasterEdge.Imaging.Basic;

namespace RE__Test
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)
{
string fileName = "c:/Sample.png";

REImage reImage = REFile.OpenImageFile(fileName);

REFile.SaveImageFile(reImage, "c:/reimage.png", new PNGEncoder());
}
}
}
It's easy.As for the converting image to midi.I only know there is an image process add-on.You can have a try.Good luck!
Abigail111 is offline   Reply With Quote
Old 08-23-2017, 02:03 AM   #5
RobertoWells
Human being with feelings
 
Join Date: Aug 2017
Posts: 1
Default Nice web tool

I use this web tool all the time: http://www.klysmafax.se/image2midi

It's great!
RobertoWells is offline   Reply With Quote
Old 08-23-2017, 03:05 AM   #6
uncleswede
Human being with feelings
 
Join Date: Feb 2015
Posts: 1,096
Default

Quote:
Originally Posted by RobertoWells View Post
I use this web tool all the time: http://www.klysmafax.se/image2midi

It's great!
Well, here's the MIDI generated by a photo of my wife. I'm not sure I agree with the outcome! ;-)

https://clyp.it/mhaqemfk
uncleswede is offline   Reply With Quote
Old 08-23-2017, 07:20 AM   #7
alanofoz
Human being with feelings
 
alanofoz's Avatar
 
Join Date: Sep 2009
Location: Oz - Blue Mountains NSW, formerly Geelong
Posts: 943
Default

You should hear the one I made of my mother-in-law.

On second thought, no - you shouldn't.
__________________
It's "its" except when it's "it is".

alanofoz, aka Alan of Australia
alanofoz is offline   Reply With Quote
Old 08-24-2017, 06:34 AM   #8
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Rough prototype Lua ReaScript (which would need to be improved in various ways to be actually usable) :
Code:
local r = gfx.loadimg(0,"C:\\Net_Downloads\\14072017\\Awesome_Troll_Face.png")
if r>=0 then 
  local w,h = gfx.getimgdim(0)
  gfx.init("foo",w,h)
  gfx.blit(r,1.0,0.0)
  gfx.update()
  local item = reaper.GetSelectedMediaItem(0,0)
  local take = reaper.GetActiveTake(item)
  local notecount = 0
  local gridsize = 16
  local stopadding = false
  for x=0,w/gridsize do
    local notepos = 3840.0/w*(x*gridsize)
    for y=0,h/gridsize do
      gfx.x = x*gridsize
      gfx.y = y*gridsize
      local cr,cg,cb = gfx.getpixel()
      if cr>0.0 and cg>0.0 and cb>0.0 then
        local pitch = math.floor(127.0-(127.0/h*(y*gridsize)))
        notecount=notecount+1
        if notecount>5000 then stopadding = true end
        reaper.MIDI_InsertNote(take,false,false,notepos,notepos+50.0,1,pitch,127,true)
      end
    end
    if stopadding == true then break end
  end
  reaper.MIDI_Sort(take)
  gfx.quit()
  --reaper.ShowConsoleMsg(notecount.."\n")
end
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Xenakios is offline   Reply With Quote
Old 08-24-2017, 06:43 AM   #9
dea-man
Human being with feelings
 
dea-man's Avatar
 
Join Date: Oct 2009
Posts: 6,290
Default

Quote:
Originally Posted by uncleswede View Post
Well, here's the MIDI generated by a photo of my wife. I'm not sure I agree with the outcome! ;-)

https://clyp.it/mhaqemfk
She sounded a little...shall we say...psychotic.....that day!
__________________
"F" off.
dea-man is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 04:42 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.