
function chord = striproot(chordinput,rootc)

if nargin<2
    rootc=0;
end


    [rootnote, shorthand, intervals, bass, success, errormessage] = parsechord(chordinput);

    if strcmp(rootnote, 'N')
            chord = 'N';   
    else
            if isempty(shorthand) && isempty(intervals)
                chord = 'X';
            elseif isempty(intervals)
                chord = ['X:' shorthand];
            elseif isempty(shorthand)
                chord = ['X:(' intervals ')'];
            else
                chord = ['X:' shorthand '(' intervals ')'];
            end

            if ~isempty(bass)
                chord = [chord '/' bass];
            end
     
            if rootc
                chord(1) = 'C';
            end
    end
     
    